lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] Three potential syntax errors in DHCP.c


From: Rejean Groleau
Subject: [lwip-devel] Three potential syntax errors in DHCP.c
Date: Fri, 21 Nov 2008 12:19:51 -0800 (PST)

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
-- 
View this message in context: 
http://www.nabble.com/Three-potential-syntax-errors-in-DHCP.c-tp20626705p20626705.html
Sent from the lwip-devel mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]