From ff402549052eb4b98ac9404a2f273d78ce323c94 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 1 Aug 2008 12:50:28 +0200 Subject: fix: wrong use of timersub in cache_timer Fix wrong output in the dump of the expire timer which was negative. Signed-off-by: Pablo Neira Ayuso --- src/cache_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cache_timer.c') diff --git a/src/cache_timer.c b/src/cache_timer.c index 6619c2c..44482b7 100644 --- a/src/cache_timer.c +++ b/src/cache_timer.c @@ -64,7 +64,7 @@ static int timer_dump(struct us_conntrack *u, void *data, char *buf, int type) return 0; gettimeofday(&tv, NULL); - timersub(&tv, &alarm->tv, &tmp); + timersub(&alarm->tv, &tv, &tmp); return sprintf(buf, " [expires in %lds]", tmp.tv_sec); } -- cgit v1.2.3