time_t casts

This commit is contained in:
christos 2012-03-21 00:34:54 +00:00
parent de9f2b1f30
commit a8d19c80ee
2 changed files with 8 additions and 8 deletions

View File

@ -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));
}

View File

@ -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;