[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #24921] Three potential syntax errors in DHCP.c
From: |
Rejean Groleau |
Subject: |
[lwip-devel] [bug #24921] Three potential syntax errors in DHCP.c |
Date: |
Mon, 24 Nov 2008 20:08:50 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 (.NET CLR 3.5.30729) |
URL:
<http://savannah.nongnu.org/bugs/?24921>
Summary: Three potential syntax errors in DHCP.c
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: rejeangroleau
Submitted on: Mon 24 Nov 2008 08:08:49 PM GMT
Category: None
Severity: 3 - Normal
Item Group: Compiler Warning
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release:
lwIP version: CVS Head
_______________________________________________________
Details:
I was "linting" the LwIP source code the other day, and I found three trivial
warnings that might cause problems. It is likely that the related lines of
codes are in fact error-free, and that I misunderstood what they were actually
doing.
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).
If this is indeed an error, I think it would only result in a
misinterpretation of the DHCP overloaded options.
In the end, erroneous or invalid options would be used instead of the ones
specified by the DHCP server.
- Rejean Groleau
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?24921>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #24921] Three potential syntax errors in DHCP.c,
Rejean Groleau <=