utimens: avoid shadowing warning
authorEric Blake <ebb9@byu.net>
Thu, 31 Dec 2009 19:28:35 +0000 (12:28 -0700)
committerEric Blake <ebb9@byu.net>
Fri, 1 Jan 2010 02:25:48 +0000 (19:25 -0700)
commitf32ad11f3c49f708a37d6d6f0327bc8444df2dcd
treeea4337c63e31e13d5e78d1e243a88c2ffc62adda
parent00b8e3f73a4370d64a6d8ec20c28b13f2d856bfb
utimens: avoid shadowing warning

lutimens declared struct stat st in two scopes.  Worse, on Linux
kernels between 2.6.18 and 2.6.22 (when utimensat existed, but
rejected AT_SYMLINK_NOFOLLOW) or before 2.6.18 (if the glibc
headers have utimensat, but the kernel does not), it would
result in redundant [fl]stat calls.

* lib/utimens.c (fdutimens, lutimens): Consolidate separate stat
buffers into one, to avoid shadowing, as well as avoiding a
redundant stat.
Reported by Jim Meyering.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/utimens.c