lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] [bug #43499] Wrong argument order in src/include/netif/


From: GOAS Benoit (SAGEM DEFENSE SECURITE)
Subject: Re: [lwip-devel] [bug #43499] Wrong argument order in src/include/netif/etharp.h defines
Date: Wed, 29 Oct 2014 18:46:53 +0100

Hi

not exactly (as far as I understood it) : the calls to the functions (from 
etharp.c, and probably only there) don't have to change, and would then be 
correctly self-documented.
See (address@hidden)
  ETHADDR32_COPY(&ethhdr->dest, dst);
  ETHADDR16_COPY(&ethhdr->src, src);
which expands to
  SMEMCPY(&ethhdr->dest, dst , ETHARP_HWADDR_LEN);
  SMEMCPY(&ethhdr->src, src , ETHARP_HWADDR_LEN);
which expands to
  memcpy(&ethhdr->dest, dst , ETHARP_HWADDR_LEN);
  memcpy(&ethhdr->src, src , ETHARP_HWADDR_LEN);

The copy is done from the right side variable onto the left side variable 
anyway, so I don't see why the macro
 #define ETHADDR32_COPY(src, dst)  SMEMCPY(src, dst, ETHARP_HWADDR_LEN)
names the destination src and the source dst.
Even if it does work...

No API change is needed anywhere if you swap BOTH src and dst names. Just the 
"self documentation" (= this h file) is fixed.
As far as I know ;-) And it worked on my target.
Except if I wrote my bug report wrong, I'm not suggesting to change only one of 
the dst,src pair, which would indeed force all user code to be fixed too...

B. Goas

-----Original Message-----
From: Sylvain Rochet [mailto:address@hidden
Sent: Wednesday, October 29, 2014 6:35 PM
To: Sylvain Rochet; GOAS Benoit (SAGEM DEFENSE SECURITE); address@hidden; 
address@hidden
Subject: [bug #43499] Wrong argument order in src/include/netif/etharp.h defines

Follow-up Comment #1, bug #43499 (project lwip):

What you are suggesting is a silent API break which is going to put ALL lwIP 
users on nerves.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?43499>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/

#
" Ce courriel et les documents qui lui sont joints peuvent contenir des 
informations confidentielles, être soumis aux règlementations relatives au 
contrôle des exportations ou ayant un caractère privé. S'ils ne vous sont pas 
destinés, nous vous signalons qu'il est strictement interdit de les divulguer, 
de les reproduire ou d'en utiliser de quelque manière que ce soit le contenu. 
Toute exportation ou réexportation non autorisée est interdite Si ce message 
vous a été transmis par erreur, merci d'en informer l'expéditeur et de 
supprimer immédiatement de votre système informatique ce courriel ainsi que 
tous les documents qui y sont attachés."
******
" This e-mail and any attached documents may contain confidential or 
proprietary information and may be subject to export control laws and 
regulations. If you are not the intended recipient, you are notified that any 
dissemination, copying of this e-mail and any attachments thereto or use of 
their contents by any means whatsoever is strictly prohibited. Unauthorized 
export or re-export is prohibited. If you have received this e-mail in error, 
please advise the sender immediately and delete this e-mail and all attached 
documents from your computer system."
#

reply via email to

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