Code

src/daemon/utils_tail_match.c: Use match_value_reset().
[collectd.git] / src / daemon / collectd.c
index c9e49f8070536e8d1b99044c74fa0352b7c40178..4843fc659bd46d5c14191a26dc5b70f78b815645 100644 (file)
@@ -341,7 +341,6 @@ static int do_loop (void)
 
        while (loop == 0)
        {
-               struct timespec ts_wait = { 0, 0 };
                cdtime_t now;
 
 #if HAVE_LIBKSTAT
@@ -361,7 +360,7 @@ static int do_loop (void)
                        continue;
                }
 
-               CDTIME_T_TO_TIMESPEC (wait_until - now, &ts_wait);
+               struct timespec ts_wait = CDTIME_T_TO_TIMESPEC (wait_until - now);
                wait_until = wait_until + interval;
 
                while ((loop == 0) && (nanosleep (&ts_wait, &ts_wait) != 0))