mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-02 14:58:22 +00:00
PPP: Fix shadowing of global declaration
Older compilers (GCC 4.6) don't like variables with the same name as global functions: lwip/src/netif/ppp/lcp.c: In function 'lcp_received_echo_reply': lwip/src/netif/ppp/lcp.c:2685:11: error: declaration of 'magic' shadows a global declaration [-Werror=shadow] lwip/src/include/netif/ppp/magic.h:101:7: error: shadowed declaration is here [-Werror=shadow] magic.h contains a function named magic(), so rename the variable.
This commit is contained in:
parent
495fc61a34
commit
1fef434f01
@ -2682,7 +2682,7 @@ static void LcpEchoTimeout(void *arg) {
|
||||
static void lcp_received_echo_reply(fsm *f, int id, u_char *inp, int len) {
|
||||
ppp_pcb *pcb = f->pcb;
|
||||
lcp_options *go = &pcb->lcp_gotoptions;
|
||||
u32_t magic;
|
||||
u32_t magic_val;
|
||||
LWIP_UNUSED_ARG(id);
|
||||
|
||||
/* Check the magic number - don't count replies from ourselves. */
|
||||
@ -2690,9 +2690,9 @@ static void lcp_received_echo_reply(fsm *f, int id, u_char *inp, int len) {
|
||||
ppp_dbglog("lcp: received short Echo-Reply, length %d", len);
|
||||
return;
|
||||
}
|
||||
GETLONG(magic, inp);
|
||||
GETLONG(magic_val, inp);
|
||||
if (go->neg_magicnumber
|
||||
&& magic == go->magicnumber) {
|
||||
&& magic_val == go->magicnumber) {
|
||||
ppp_warn("appear to have received our own echo-reply!");
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user