[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #43499] Wrong argument order in src/include/netif/etha
From: |
goas |
Subject: |
[lwip-devel] [bug #43499] Wrong argument order in src/include/netif/etharp.h defines |
Date: |
Wed, 29 Oct 2014 17:29:47 +0000 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MS-RTC LM 8; InfoPath.3; .NET4.0C; .NET4.0E) |
URL:
<http://savannah.nongnu.org/bugs/?43499>
Summary: Wrong argument order in src/include/netif/etharp.h
defines
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: bgab001
Submitted on: mer. 29 oct. 2014 17:29:45 GMT
Category: None
Severity: 3 - Normal
Item Group: Change Request
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release:
lwIP version: git head
_______________________________________________________
Details:
Hi
In file src/include/netif/etharp.h, there are the macros
#define ETHADDR32_COPY(src, dst) SMEMCPY(src, dst, ETHARP_HWADDR_LEN)
#define ETHADDR16_COPY(src, dst) SMEMCPY(src, dst, ETHARP_HWADDR_LEN)
It works fine, but in reality all memcpy() functions I ever saw actually use
(dst, src), as does the one on my ARM board, called after expanding all
macros.
So it's easy to mess up a port or not understand what the code is supposed to
do with this wrong argument order.
Can it be fixed to the following ?
#define ETHADDR32_COPY(dst, src) SMEMCPY(dst, src, ETHARP_HWADDR_LEN)
#define ETHADDR16_COPY(dst, src) SMEMCPY(dst, src, ETHARP_HWADDR_LEN)
B.G.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?43499>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #43499] Wrong argument order in src/include/netif/etharp.h defines,
goas <=