fixed bug #34581 missing parentheses in udplite sockets code

This commit is contained in:
goldsimon 2011-10-18 11:04:08 +02:00
parent 21f39082b7
commit 9621ccb712
2 changed files with 5 additions and 2 deletions

View File

@ -49,6 +49,9 @@ HISTORY
++ Bugfixes: ++ Bugfixes:
2011-10-18: Simon Goldschmidt
* sockets.c: fixed bug #34581 missing parentheses in udplite sockets code
2011-10-18: Simon Goldschmidt 2011-10-18: Simon Goldschmidt
* sockets.h: fixed bug #34580 fcntl() is missing in LWIP_COMPAT_SOCKETS * sockets.h: fixed bug #34580 fcntl() is missing in LWIP_COMPAT_SOCKETS

View File

@ -2245,7 +2245,7 @@ lwip_setsockopt_internal(void *arg)
case IPPROTO_UDPLITE: case IPPROTO_UDPLITE:
switch (optname) { switch (optname) {
case UDPLITE_SEND_CSCOV: case UDPLITE_SEND_CSCOV:
if ((*(int*)optval != 0) && ((*(int*)optval < 8)) || (*(int*)optval > 0xffff)) { if ((*(int*)optval != 0) && ((*(int*)optval < 8) || (*(int*)optval > 0xffff))) {
/* don't allow illegal values! */ /* don't allow illegal values! */
sock->conn->pcb.udp->chksum_len_tx = 8; sock->conn->pcb.udp->chksum_len_tx = 8;
} else { } else {
@ -2255,7 +2255,7 @@ lwip_setsockopt_internal(void *arg)
s, (*(int*)optval)) ); s, (*(int*)optval)) );
break; break;
case UDPLITE_RECV_CSCOV: case UDPLITE_RECV_CSCOV:
if ((*(int*)optval != 0) && ((*(int*)optval < 8)) || (*(int*)optval > 0xffff)) { if ((*(int*)optval != 0) && ((*(int*)optval < 8) || (*(int*)optval > 0xffff))) {
/* don't allow illegal values! */ /* don't allow illegal values! */
sock->conn->pcb.udp->chksum_len_rx = 8; sock->conn->pcb.udp->chksum_len_rx = 8;
} else { } else {