From eaca03fed90a7865a02a28ad29f9eebb8d1eb4b1 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 13 Nov 2009 18:13:19 +0000 Subject: Tidy up and fix some types, prompted by lint via deraadt. --- usr.bin/tmux/server-client.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index bd4b3ed61fc..50cebd4ddf6 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.19 2009/11/11 08:00:42 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.20 2009/11/13 18:13:18 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -197,7 +197,9 @@ server_client_status_timer(void) struct session *s; struct job *job; struct timeval tv; - u_int i, interval; + u_int i; + int interval; + time_t difference; if (gettimeofday(&tv, NULL) != 0) fatal("gettimeofday failed"); @@ -220,9 +222,10 @@ server_client_status_timer(void) continue; interval = options_get_number(&s->options, "status-interval"); - if (tv.tv_sec - c->status_timer.tv_sec >= interval) { + difference = tv.tv_sec - c->status_timer.tv_sec; + if (difference >= interval) { RB_FOREACH(job, jobs, &c->status_jobs) - job_run(job); + job_run(job); c->flags |= CLIENT_STATUS; } } -- cgit v1.2.3