Initialise the "trials" variable to zero earlier in case we unexpectedly

error out early.

Found by:	clang static analyzer
This commit is contained in:
Gavin Atkinson 2010-06-19 17:04:01 +00:00
parent acdfff93b6
commit 913a61f799
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=209344

View File

@ -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);