From 437bbee20b2fef67357bfbddc493a76cdfafdd1b Mon Sep 17 00:00:00 2001 From: Daniel Salzman <daniel.salzman@nic.cz> Date: Wed, 13 Jan 2016 18:01:41 +0100 Subject: [PATCH] ctl: fix dead code (Coverity) --- src/knot/ctl/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/knot/ctl/commands.c b/src/knot/ctl/commands.c index 7c22edb61f..8fc7cba694 100644 --- a/src/knot/ctl/commands.c +++ b/src/knot/ctl/commands.c @@ -137,9 +137,9 @@ static int zone_status(zone_t *zone, remote_cmdargs_t *a) char when[128] = { '\0' }; zone_event_type_t next_type = ZONE_EVENT_INVALID; const char *next_name = ""; + time_t next_time = zone_events_get_next(zone, &next_type); if (next_type != ZONE_EVENT_INVALID) { next_name = zone_events_get_name(next_type); - time_t next_time = zone_events_get_next(zone, &next_type); next_time = next_time - time(NULL); if (next_time < 0) { memcpy(when, "pending", strlen("pending")); -- GitLab