I was "linting" the LwIP source code the other day, and I found three trivial
warnings that might cause problems. Most likely the related lines of codes
are in fact error-free, and I misunderstood what they were actually doing,
but still I thought I should share the information on this mailing list.
1. In the file DHCP.c:
a. Line 1472:
- Before: options = (u8_t *)&dhcp->msg_in->file
- After: options = (u8_t *)dhcp->msg_in->file
- Explanation: the line was doing "pointer = address of pointer",
instead of doing "pointer = pointer".
b. Lines 1476 and 1481:
- Before: options = (u8_t *)&dhcp->msg_in->sname
- After: options = (u8_t *)dhcp->msg_in->sname
- Explanation: (same as line 1472).
And that's all I found. I added a few assertion macros on tcp_pcb pointers
to validate my own calls, but nothing really worth mentioning. The stack is
very well coded in my opinion.
- Rejean Groleau