]> granicus.if.org Git - strace/blobdiff - sock.c
tests: add a test for -yy option
[strace] / sock.c
diff --git a/sock.c b/sock.c
index 3d4f0b6466669e00c0bc670814d4429c827ec8d1..dca9bfd4713a45857c1391e011bc90d1bdfefaf4 100644 (file)
--- a/sock.c
+++ b/sock.c
 #endif
 #include <net/if.h>
 
-static const struct xlat iffflags[] = {
-       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),
-       XLAT_END
-};
+#include "xlat/iffflags.h"
 
 static void
 print_addr(struct tcb *tcp, long addr, struct ifreq *ifr)
@@ -241,8 +224,8 @@ sock_ioctl(struct tcb *tcp, long code, long arg)
                } else if (ifc.ifc_buf == NULL) {
                        tprints("NULL");
                } else {
-                       int i;
-                       unsigned nifra = ifc.ifc_len / sizeof(struct ifreq);
+                       unsigned int i;
+                       unsigned int nifra = ifc.ifc_len / sizeof(struct ifreq);
                        struct ifreq ifra[nifra];
 
                        if (umoven(tcp, (unsigned long) ifc.ifc_buf,