Skip to content

Commit

Permalink
timer_nextduein returned crap. fix it. so obvious... how could that h…
Browse files Browse the repository at this point in the history
…appen.

found out the hard way by Marc Runkel <MRunkel@untangle.com>
  • Loading branch information
henning committed Jan 21, 2009
1 parent 1b109c5 commit 13fba73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usr.sbin/bgpd/timer.c
@@ -1,4 +1,4 @@
/* $OpenBSD: timer.c,v 1.12 2008/06/11 05:30:35 henning Exp $ */
/* $OpenBSD: timer.c,v 1.13 2009/01/21 20:32:53 henning Exp $ */

/*
* Copyright (c) 2003-2007 Henning Brauer <henning@openbsd.org>
Expand Down Expand Up @@ -65,7 +65,7 @@ timer_nextduein(struct peer *p)
struct peer_timer *pt;

if ((pt = TAILQ_FIRST(&p->timers)) != NULL && pt->val > 0)
return (pt->val);
return (MAX(pt->val - getmonotime(), 0));
return (-1);
}

Expand Down

0 comments on commit 13fba73

Please sign in to comment.