lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #8686] udp_set_multicast_ttl() macro is non-function


From: Stian Sebastian Skjelstad
Subject: [lwip-devel] [patch #8686] udp_set_multicast_ttl() macro is non-function
Date: Tue, 16 Jun 2015 09:37:42 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36

URL:
  <http://savannah.nongnu.org/patch/?8686>

                 Summary: udp_set_multicast_ttl() macro is non-function
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: mywave
            Submitted on: Tue 16 Jun 2015 09:37:40 AM GMT
                Category: UDP
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

Current code is

#define udp_set_multicast_ttl(pcb, mcast_ttl)      do { (pcb)->mcast_ttl =
mcast_ttl; } while(0)

Problem is that mcast_ttl is both parameter name, and the member in the
structure you want to access, so this code

udp_set_multicast_ttl(p, 1);

will become
p->1 = 1;

What we wanted was
p->mcast_ttl = 1;


Patch simply renames the macro parameter name into "value"





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 16 Jun 2015 09:37:40 AM GMT  Name:
0001-Macro-parameter-name-can-not-be-the-same-as-the-stru.patch  Size: 1kB  
By: mywave

<http://savannah.nongnu.org/patch/download.php?file_id=34232>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8686>

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




reply via email to

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