net: contiki: Init UDP connection list properly
It is better to initialize the UDP connection array fully in init instead of setting only the port number to zero. This way we do not have any garbage bytes left around. Change-Id: I90dcf6dc39a5a108818f25796160ca7dc52ba9d9 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
6a2e400076
commit
6f059122f7
1 changed files with 3 additions and 3 deletions
|
@ -438,7 +438,9 @@ uip_udpchksum(struct net_buf *buf)
|
|||
void
|
||||
uip_init(void)
|
||||
{
|
||||
#if UIP_TCP
|
||||
uint8_t c;
|
||||
#endif
|
||||
|
||||
uip_ds6_init();
|
||||
uip_icmp6_init();
|
||||
|
@ -458,9 +460,7 @@ uip_init(void)
|
|||
#endif /* UIP_ACTIVE_OPEN || UIP_UDP */
|
||||
|
||||
#if UIP_UDP
|
||||
for(c = 0; c < UIP_UDP_CONNS; ++c) {
|
||||
uip_udp_conns[c].lport = 0;
|
||||
}
|
||||
memset(&uip_udp_conns, 0, sizeof(uip_udp_conns));
|
||||
#endif /* UIP_UDP */
|
||||
|
||||
#if UIP_CONF_IPV6_MULTICAST
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue