diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2003-07-08 00:11:51 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2003-07-08 00:11:51 +0000 |
commit | bbbe42378392d8d578da8348ef48bfba8a048fd3 (patch) | |
tree | 30dd14d007a1f0153831606c7665b9d430ebabb6 /lib/libc | |
parent | 181eea40699913be3866b6adc7cdba005cbeeafb (diff) |
KNF + ansification
ok deraadt@, vincent@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/time.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/libc/gen/time.c b/lib/libc/gen/time.c index dedd37e61dd..6daa35d9ed7 100644 --- a/lib/libc/gen/time.c +++ b/lib/libc/gen/time.c @@ -28,21 +28,20 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: time.c,v 1.3 2003/06/02 20:18:35 millert Exp $"; +static char rcsid[] = "$OpenBSD: time.c,v 1.4 2003/07/08 00:11:50 jfb Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> #include <sys/time.h> time_t -time(t) - time_t *t; +time(time_t *t) { struct timeval tt; if (gettimeofday(&tt, (struct timezone *)0) < 0) - return(-1); + return (-1); if (t) - *t = tt.tv_sec; - return(tt.tv_sec); + *t = (time_t)tt.tv_sec; + return (tt.tv_sec); } |