ping6: fix uninitialized variable warning for intvl
GCC isn't smart enough to realize that this variable was always initialized. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21271
This commit is contained in:
parent
3d1ee970f4
commit
b649dc225f
@ -333,6 +333,9 @@ main(int argc, char *argv[])
|
||||
memset(&smsghdr, 0, sizeof(smsghdr));
|
||||
memset(&smsgiov, 0, sizeof(smsgiov));
|
||||
|
||||
intvl.tv_sec = interval / 1000;
|
||||
intvl.tv_nsec = interval % 1000 * 1000000;
|
||||
|
||||
alarmtimeout = preload = 0;
|
||||
datap = &outpack[ICMP6ECHOLEN + ICMP6ECHOTMLEN];
|
||||
capdns = capdns_setup();
|
||||
@ -1121,9 +1124,6 @@ main(int argc, char *argv[])
|
||||
if (options & F_FLOOD) {
|
||||
intvl.tv_sec = 0;
|
||||
intvl.tv_nsec = 10000000;
|
||||
} else if ((options & F_INTERVAL) == 0) {
|
||||
intvl.tv_sec = interval / 1000;
|
||||
intvl.tv_nsec = interval % 1000 * 1000000;
|
||||
}
|
||||
|
||||
almost_done = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user