diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-08-08 08:51:22 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-08-08 08:51:22 +0000 |
commit | 924a7ff7faa7300916e6bb1bc330a2ab4abd69f4 (patch) | |
tree | 99ca82e953da7e4a0bedbb8f5ef70865eb6f428a /usr.sbin/relayd/check_icmp.c | |
parent | bbc0041d77729a4313493f1f7efd97049630d0e0 (diff) |
Check gettimeofday() against -1; Add a missing error check in one place.
OK reyk@
Diffstat (limited to 'usr.sbin/relayd/check_icmp.c')
-rw-r--r-- | usr.sbin/relayd/check_icmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/relayd/check_icmp.c b/usr.sbin/relayd/check_icmp.c index c022077f936..f5518582f63 100644 --- a/usr.sbin/relayd/check_icmp.c +++ b/usr.sbin/relayd/check_icmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: check_icmp.c,v 1.24 2008/07/19 10:52:32 reyk Exp $ */ +/* $OpenBSD: check_icmp.c,v 1.25 2008/08/08 08:51:21 thib Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -93,7 +93,7 @@ check_icmp_add(struct ctl_icmp_event *cie, int flags, struct timeval *start, if (start != NULL) bcopy(start, &cie->tv_start, sizeof(cie->tv_start)); bcopy(&cie->env->sc_timeout, &tv, sizeof(tv)); - if (gettimeofday(&cie->tv_start, NULL)) + if (gettimeofday(&cie->tv_start, NULL) == -1) fatal("check_icmp_add: gettimeofday"); event_del(&cie->ev); event_set(&cie->ev, cie->s, EV_TIMEOUT|flags, fn, cie); |