[U-Boot] what is with the "#if 0"ed part of ARP hdr in include/net.h?

was poking around in include/net.h, and noticed this snippet:
/* * Address Resolution Protocol (ARP) header. */ struct arp_hdr {
... snip ...
#define ar_sha ar_data[0] #define ar_spa ar_data[ARP_HLEN] #define ar_tha ar_data[ARP_HLEN + ARP_PLEN] #define ar_tpa ar_data[ARP_HLEN + ARP_PLEN + ARP_HLEN] #if 0 u8 ar_sha[]; /* Sender hardware address */ u8 ar_spa[]; /* Sender protocol address */ u8 ar_tha[]; /* Target hardware address */ u8 ar_tpa[]; /* Target protocol address */ #endif /* 0 */ };
i just checked, and that "#if 0" has been there since 2002:
2d966958 (Wolfgang Denk 2002-10-31 22:12:35 +0000 421) #if 0 717234e0 (Sergey Temerkhanov 2015-04-08 01:41:23 -0500 422) u8 ar_sha[]; /* Sender hardware address */ 717234e0 (Sergey Temerkhanov 2015-04-08 01:41:23 -0500 423) u8 ar_spa[]; /* Sender protocol address */ 717234e0 (Sergey Temerkhanov 2015-04-08 01:41:23 -0500 424) u8 ar_tha[]; /* Target hardware address */ 717234e0 (Sergey Temerkhanov 2015-04-08 01:41:23 -0500 425) u8 ar_tpa[]; /* Target protocol address */ 2d966958 (Wolfgang Denk 2002-10-31 22:12:35 +0000 426) #endif /* 0 */
is it doing anything, like acting as a comment or something?
rday
p.s. there's quite a lot of "#if 0" throughout the source code, some of which i may submit patches to get rid of just in the areas i'm confortable with.

Dear "Robert P. J. Day",
In message alpine.LFD.2.20.1607170606270.5540@localhost.localdomain you wrote:
was poking around in include/net.h, and noticed this snippet:
...
is it doing anything, like acting as a comment or something?
Probably. Sorry, I dont remember the details.
p.s. there's quite a lot of "#if 0" throughout the source code, some of which i may submit patches to get rid of just in the areas i'm confortable with.
In many cases this was used to create "minimal" diffs compared to the original code imported from elsewhere. Commenting a bigger block of code using "#if 0" was deemed to be easier to forward-port to new versions of the code than deleting the whole block, where any changes in this (uninteresting) code would cause conflicts.
Best regards,
Wolfgang Denk
participants (2)
-
Robert P. J. Day
-
Wolfgang Denk