Commit 437bbee2 authored by Daniel Salzman's avatar Daniel Salzman

ctl: fix dead code (Coverity)

parent 8d639e5c
......@@ -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"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment