Initialise the "trials" variable to zero earlier in case we unexpectedly
error out early. Found by: clang static analyzer
This commit is contained in:
parent
acdfff93b6
commit
913a61f799
@ -86,6 +86,7 @@ measure(maxmsec, wmsec, hname, addr, print)
|
||||
min_idelta = min_odelta = 0x7fffffff;
|
||||
measure_status = HOSTDOWN;
|
||||
measure_delta = HOSTDOWN;
|
||||
trials = 0;
|
||||
errno = 0;
|
||||
|
||||
/* open raw socket used to measure time differences */
|
||||
@ -138,7 +139,6 @@ measure(maxmsec, wmsec, hname, addr, print)
|
||||
mstotvround(&twait, wmsec);
|
||||
|
||||
rcvcount = 0;
|
||||
trials = 0;
|
||||
while (rcvcount < MSGS) {
|
||||
(void)gettimeofday(&tcur, 0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user