mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-28 21:07:55 +00:00
moved HAVE_UTIME_NULL stuff to update_timestamp() where t belongs
This commit is contained in:
parent
07c8eb7719
commit
8ff79b51eb
11
utime.c
11
utime.c
@ -56,9 +56,9 @@ int utime(file, tvp)
|
|||||||
const char *file; /* file to udpate */
|
const char *file; /* file to udpate */
|
||||||
const struct utimbuf *utp; /* what to update to */
|
const struct utimbuf *utp; /* what to update to */
|
||||||
{
|
{
|
||||||
struct timeval tv[2];
|
|
||||||
|
|
||||||
if (upt) {
|
if (upt) {
|
||||||
|
struct timeval tv[2];
|
||||||
|
|
||||||
tv[0].tv_sec = ut.actime;
|
tv[0].tv_sec = ut.actime;
|
||||||
tv[0].tv_usec = 0;
|
tv[0].tv_usec = 0;
|
||||||
|
|
||||||
@ -67,13 +67,6 @@ int utime(file, tvp)
|
|||||||
|
|
||||||
return(utimes(file, tv);
|
return(utimes(file, tv);
|
||||||
} else {
|
} else {
|
||||||
#ifdef HAVE_UTIME_NULL
|
|
||||||
return(utimes(file, NULL);
|
return(utimes(file, NULL);
|
||||||
#else
|
|
||||||
tv[0].tv_sec = tv[1].tv_sec = time(NULL);
|
|
||||||
tv[0].tv_usec = tv[1].tv_usec = 0;
|
|
||||||
|
|
||||||
return(utimes(file, tv);
|
|
||||||
#endif /* HAVE_UTIME_NULL */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user