Use XLAT macro
Automatically convert all xlat structures to XLAT form
using the following sed regexp:
s/^[[:space:]]*{[[:space:]]*\([^",}[:space:]]\+\)[[:space:]]*,[[:space:]]*"\1",\?[[:space:]]*}[[:space:]]*/\tXLAT(\1)/
diff --git a/sock.c b/sock.c
index 9c6fe96..68a662f 100644
--- a/sock.c
+++ b/sock.c
@@ -39,21 +39,21 @@
#include <net/if.h>
static const struct xlat iffflags[] = {
- { IFF_UP, "IFF_UP" },
- { IFF_BROADCAST, "IFF_BROADCAST" },
- { IFF_DEBUG, "IFF_DEBUG" },
- { IFF_LOOPBACK, "IFF_LOOPBACK" },
- { IFF_POINTOPOINT, "IFF_POINTOPOINT" },
- { IFF_NOTRAILERS, "IFF_NOTRAILERS" },
- { IFF_RUNNING, "IFF_RUNNING" },
- { IFF_NOARP, "IFF_NOARP" },
- { IFF_PROMISC, "IFF_PROMISC" },
- { IFF_ALLMULTI, "IFF_ALLMULTI" },
- { IFF_MASTER, "IFF_MASTER" },
- { IFF_SLAVE, "IFF_SLAVE" },
- { IFF_MULTICAST, "IFF_MULTICAST" },
- { IFF_PORTSEL, "IFF_PORTSEL" },
- { IFF_AUTOMEDIA, "IFF_AUTOMEDIA" },
+ XLAT(IFF_UP),
+ XLAT(IFF_BROADCAST),
+ XLAT(IFF_DEBUG),
+ XLAT(IFF_LOOPBACK),
+ XLAT(IFF_POINTOPOINT),
+ XLAT(IFF_NOTRAILERS),
+ XLAT(IFF_RUNNING),
+ XLAT(IFF_NOARP),
+ XLAT(IFF_PROMISC),
+ XLAT(IFF_ALLMULTI),
+ XLAT(IFF_MASTER),
+ XLAT(IFF_SLAVE),
+ XLAT(IFF_MULTICAST),
+ XLAT(IFF_PORTSEL),
+ XLAT(IFF_AUTOMEDIA),
{ 0, NULL }
};