diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 2003-07-19 02:53:46 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 2003-07-19 02:53:46 +0000 |
commit | d09b8962154f486b18f40fd0a2e5c194fb0f11b5 (patch) | |
tree | 4cc6057acc09443c5e211e05eb009dd6d2dbf8c4 | |
parent | 1ebe99867588cb6f013b59936f2e116a68833900 (diff) |
Notes
-rw-r--r-- | lib/libc/gen/time.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libc/gen/time.c b/lib/libc/gen/time.c index 21548335fe268..4468b0154015c 100644 --- a/lib/libc/gen/time.c +++ b/lib/libc/gen/time.c @@ -45,10 +45,13 @@ time(t) time_t *t; { struct timeval tt; + time_t retval; if (gettimeofday(&tt, (struct timezone *)0) < 0) - return (-1); - if (t) - *t = tt.tv_sec; - return (tt.tv_sec); + retval = -1; + else + retval = tt.tv_sec; + if (t != NULL) + *t = retval; + return (retval); } |