hush: remove superfluous assignment
[oweals/busybox.git] / networking / tc.c
index 79cdd7c55d4e818eff96056254d5f62a6298d3a8..d9636949c30cf0e4dbc7c5322e6d44964e02d146 100644 (file)
@@ -89,7 +89,7 @@ static int get_qdisc_handle(__u32 *h, const char *str) {
        if (p == str)
                return 1;
        maj <<= 16;
-       if (*p != ':' && *p!=0)
+       if (*p != ':' && *p != '\0')
                return 1;
  ok:
        *h = maj;
@@ -119,7 +119,8 @@ static int get_tc_classid(__u32 *h, const char *str) {
                maj <<= 16;
                str = p + 1;
                min = strtoul(str, &p, 16);
-               if (*p != 0 || min >= (1<<16))
+//FIXME: check for "" too?
+               if (*p != '\0' || min >= (1<<16))
                        return 1;
                maj |= min;
        } else if (*p != 0)
@@ -322,7 +323,7 @@ static int print_qdisc(const struct sockaddr_nl *who UNUSED_PARAM,
                int qqq = index_in_strings(_q_, name);
                if (qqq == 0) { /* pfifo_fast aka prio */
                        prio_print_opt(tb[TCA_OPTIONS]);
-               } else if (qqq == 1) { /* class based queueing */
+               } else if (qqq == 1) { /* class based queuing */
                        cbq_print_opt(tb[TCA_OPTIONS]);
                } else
                        bb_error_msg("unknown %s", name);
@@ -388,7 +389,7 @@ static int print_class(const struct sockaddr_nl *who UNUSED_PARAM,
                int qqq = index_in_strings(_q_, name);
                if (qqq == 0) { /* pfifo_fast aka prio */
                        /* nothing. */ /*prio_print_opt(tb[TCA_OPTIONS]);*/
-               } else if (qqq == 1) { /* class based queueing */
+               } else if (qqq == 1) { /* class based queuing */
                        /* cbq_print_copt() is identical to cbq_print_opt(). */
                        cbq_print_opt(tb[TCA_OPTIONS]);
                } else
@@ -516,7 +517,7 @@ int tc_main(int argc UNUSED_PARAM, char **argv)
                                duparg(*argv, "priority");
                        filter_prio = get_u32(*argv, "priority");
                } else if (arg == ARG_proto) { /* filter::list */
-                       __u16 tmp;
+                       uint16_t tmp;
                        if (filter_proto)
                                duparg(*argv, "protocol");
                        if (ll_proto_a2n(&tmp, *argv))