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

Robert P. J. Day rpjday at crashcourse.ca
Sun Jul 17 12:12:00 CEST 2016


  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.

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



More information about the U-Boot mailing list