summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/auth_des.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2012-09-01 14:45:15 +0000
committered <ed@FreeBSD.org>2012-09-01 14:45:15 +0000
commit02dcf28b5875df173bef8c14a9ddd3d3ce67c5d4 (patch)
tree496a0b9a3b14c27d50e1ae3b28265ecf5c2023f2 /lib/libc/rpc/auth_des.c
parenta6edc1e4b7ca5750cf84fb6a6b048b796c0cc77f (diff)
downloadFreeBSD-src-02dcf28b5875df173bef8c14a9ddd3d3ce67c5d4.zip
FreeBSD-src-02dcf28b5875df173bef8c14a9ddd3d3ce67c5d4.tar.gz
Rework all non-contributed files that use `struct timezone'.
This structure is not part of POSIX. According to POSIX, gettimeofday() has the following prototype: int gettimeofday(struct timeval *restrict tp, void *restrict tzp); Also, POSIX states that gettimeofday() shall return 0 (as long as tzp is not used). Remove dead error handling code. Also use NULL for a nul-pointer instead of integer 0. While there, change all pieces of code that only use tv_sec to use time(3), as this provides less overhead.
Diffstat (limited to 'lib/libc/rpc/auth_des.c')
-rw-r--r--lib/libc/rpc/auth_des.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/rpc/auth_des.c b/lib/libc/rpc/auth_des.c
index 8f363e9..1b45c3b 100644
--- a/lib/libc/rpc/auth_des.c
+++ b/lib/libc/rpc/auth_des.c
@@ -286,7 +286,7 @@ authdes_marshal(AUTH *auth, XDR *xdrs)
* Figure out the "time", accounting for any time difference
* with the server if necessary.
*/
- (void) gettimeofday(&ad->ad_timestamp, (struct timezone *)NULL);
+ (void)gettimeofday(&ad->ad_timestamp, NULL);
ad->ad_timestamp.tv_sec += ad->ad_timediff.tv_sec;
ad->ad_timestamp.tv_usec += ad->ad_timediff.tv_usec;
while (ad->ad_timestamp.tv_usec >= USEC_PER_SEC) {
OpenPOWER on IntegriCloud