lwip-devel
[Top][All Lists]
Advanced

[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: Sylvain Rochet
Subject: [lwip-devel] [bug #43499] Wrong argument order in src/include/netif/etharp.h defines
Date: Wed, 29 Oct 2014 18:01:02 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.2.0

Update of bug #43499 (project lwip):

                Severity:              3 - Normal => 2 - Minor              
                  Status:                    None => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #2:

> 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

Indeed, this wasn't clear at first for me this was only about a cosmetic
change.

Fixed, thank you ! :)


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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