From 426f9a1835f36088b54efdc4c4f24eff3abc2716 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Thu, 24 Sep 2020 10:38:05 +0200 Subject: [PATCH] fix warning --- miniupnpc/minissdpc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/miniupnpc/minissdpc.c b/miniupnpc/minissdpc.c index f2a1fa3..4f45dda 100644 --- a/miniupnpc/minissdpc.c +++ b/miniupnpc/minissdpc.c @@ -873,11 +873,8 @@ ssdpDiscoverDevices(const char * const deviceTypes[], * if searchalltypes is set, enter the loop only * when the last deviceType is reached */ if((sentok && !searchalltypes) || !deviceTypes[deviceIndex + 1]) { - struct timeval start, current; - if (upnp_gettimeofday(&start) < 0) { - start.tv_sec = 0; - start.tv_usec = 0; - } + struct timeval start = {0, 0}, current = {0, 0}; + upnp_gettimeofday(&start); do { n = receivedata(sudp, bufr, sizeof(bufr), delay, &scope_id); if (n < 0) {