diff options
author | dchagin <dchagin@FreeBSD.org> | 2016-04-03 06:33:16 +0000 |
---|---|---|
committer | dchagin <dchagin@FreeBSD.org> | 2016-04-03 06:33:16 +0000 |
commit | 68ea027ebe5275dda4a21e619eb28159849e2ba8 (patch) | |
tree | 7b3e2285a484cc1ca16256450d44996cdeaf9905 | |
parent | d18d104fd5485031ee140e43a4db51fc5a4087d2 (diff) | |
download | FreeBSD-src-68ea027ebe5275dda4a21e619eb28159849e2ba8.zip FreeBSD-src-68ea027ebe5275dda4a21e619eb28159849e2ba8.tar.gz |
Move Linux specific times tests up to guarantee the values are defined.
CID: 1305178
Submitted by: pfg@
MFC after: 1 week
-rw-r--r-- | sys/compat/linux/linux_misc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index cdadd41..65a6081 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -895,13 +895,14 @@ linux_utimensat(struct thread *td, struct linux_utimensat_args *args) break; } timesp = times; - } - if (times[0].tv_nsec == UTIME_OMIT && times[1].tv_nsec == UTIME_OMIT) + if (times[0].tv_nsec == UTIME_OMIT && + times[1].tv_nsec == UTIME_OMIT) /* This breaks POSIX, but is what the Linux kernel does * _on purpose_ (documented in the man page for utimensat(2)), * so we must follow that behaviour. */ return (0); + } if (args->pathname != NULL) LCONVPATHEXIST_AT(td, args->pathname, &path, dfd); |