From a8d19c80eeeec8751419d2474a6f8dea9e8b1f5d Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 21 Mar 2012 00:34:54 +0000 Subject: [PATCH] time_t casts --- lib/libc/isc/ev_timers.c | 8 ++++---- lib/libc/resolv/res_send.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/libc/isc/ev_timers.c b/lib/libc/isc/ev_timers.c index b32a703c1bce..40521a78d29b 100644 --- a/lib/libc/isc/ev_timers.c +++ b/lib/libc/isc/ev_timers.c @@ -1,4 +1,4 @@ -/* $NetBSD: ev_timers.c,v 1.10 2012/03/20 17:44:17 matt Exp $ */ +/* $NetBSD: ev_timers.c,v 1.11 2012/03/21 00:34:54 christos Exp $ */ /* * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") @@ -26,7 +26,7 @@ #ifdef notdef static const char rcsid[] = "Id: ev_timers.c,v 1.6 2005/04/27 04:56:36 sra Exp"; #else -__RCSID("$NetBSD: ev_timers.c,v 1.10 2012/03/20 17:44:17 matt Exp $"); +__RCSID("$NetBSD: ev_timers.c,v 1.11 2012/03/21 00:34:54 christos Exp $"); #endif #endif @@ -137,7 +137,7 @@ evNowTime(void) return (tsnow); #endif if (gettimeofday(&now, NULL) < 0) - return (evConsTime(0L, 0L)); + return (evConsTime((time_t)0, 0L)); return (evTimeSpec(now)); } @@ -150,7 +150,7 @@ evUTCTime(void) { return (tsnow); #endif if (gettimeofday(&now, NULL) < 0) - return (evConsTime(0L, 0L)); + return (evConsTime((time_t)0, 0L)); return (evTimeSpec(now)); } diff --git a/lib/libc/resolv/res_send.c b/lib/libc/resolv/res_send.c index 83f1788dec99..8b6fdbfa9f77 100644 --- a/lib/libc/resolv/res_send.c +++ b/lib/libc/resolv/res_send.c @@ -1,4 +1,4 @@ -/* $NetBSD: res_send.c,v 1.24 2012/03/20 17:44:18 matt Exp $ */ +/* $NetBSD: res_send.c,v 1.25 2012/03/21 00:34:54 christos Exp $ */ /* * Portions Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") @@ -93,7 +93,7 @@ static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93"; static const char rcsid[] = "Id: res_send.c,v 1.22 2009/01/22 23:49:23 tbox Exp"; #else -__RCSID("$NetBSD: res_send.c,v 1.24 2012/03/20 17:44:18 matt Exp $"); +__RCSID("$NetBSD: res_send.c,v 1.25 2012/03/21 00:34:54 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -912,7 +912,7 @@ send_dg(res_state statp, const u_char *buf, int buflen, u_char *ans, if (seconds <= 0) seconds = 1; now = evNowTime(); - timeout = evConsTime((long)seconds, 0L); + timeout = evConsTime((time_t)seconds, 0L); finish = evAddTime(now, timeout); goto nonow; wait: @@ -929,7 +929,7 @@ send_dg(res_state statp, const u_char *buf, int buflen, u_char *ans, #else timeout = evSubTime(finish, now); if (timeout.tv_sec < 0) - timeout = evConsTime(0L, 0L); + timeout = evConsTime((time_t)0, 0L); polltimeout = 1000*(int)timeout.tv_sec + (int)timeout.tv_nsec/1000000; pollfd.fd = s;