dhcpc: codechecker issuse fix
presult->serverid.s_addr maybe is garbage or undefined Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
parent
cfb64cffb1
commit
f6ab04addb
@ -696,6 +696,8 @@ int dhcpc_request(FAR void *handle, FAR struct dhcpc_state *presult)
|
|||||||
int state;
|
int state;
|
||||||
clock_t start;
|
clock_t start;
|
||||||
|
|
||||||
|
memset(presult, 0, sizeof(*presult));
|
||||||
|
|
||||||
/* RFC2131: For example, a client may choose a different,
|
/* RFC2131: For example, a client may choose a different,
|
||||||
* random initial 'xid' each time the client is rebooted, and
|
* random initial 'xid' each time the client is rebooted, and
|
||||||
* subsequently use sequential 'xid's until the next reboot.
|
* subsequently use sequential 'xid's until the next reboot.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user