- add WIP stub for tc.
[oweals/busybox.git] / networking / libiproute / ll_proto.c
index 62262c9c200f485bf9e9976787b367e266ba437c..0707fe08e9c065b2486351b28973ab8f4cfa5213 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/if_ether.h>
 #endif
 
-#ifdef UNUSED
+#warning de-bloat
 /* Before re-enabling this, please (1) conditionalize exotic protocols
  * on CONFIG_something, and (2) decouple strings and numbers
  * (use llproto_ids[] = n,n,n..; and llproto_names[] = "loop\0" "pup\0" ...;)
@@ -98,10 +98,8 @@ __PF(ECONET,econet)
 
 const char *ll_proto_n2a(unsigned short id, char *buf, int len)
 {
-       int i;
-
+       unsigned i;
        id = ntohs(id);
-
        for (i = 0; i < ARRAY_SIZE(llproto_names); i++) {
                 if (llproto_names[i].id == id)
                        return llproto_names[i].name;
@@ -112,7 +110,7 @@ const char *ll_proto_n2a(unsigned short id, char *buf, int len)
 
 int ll_proto_a2n(unsigned short *id, char *buf)
 {
-       int i;
+       unsigned i;
        for (i = 0; i < ARRAY_SIZE(llproto_names); i++) {
                 if (strcasecmp(llproto_names[i].name, buf) == 0) {
                         *id = htons(llproto_names[i].id);
@@ -125,4 +123,3 @@ int ll_proto_a2n(unsigned short *id, char *buf)
        return 0;
 }
 
-#endif /* UNUSED */