]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
tc: use get_u32() in psample action to match types
authorRoman Mashak <mrv@mojatatu.com>
Tue, 13 Mar 2018 21:16:23 +0000 (17:16 -0400)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 16 Mar 2018 20:38:50 +0000 (13:38 -0700)
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Acked-by: Yotam Gigi <yotam.gi@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/m_sample.c

index d88846c63be34159ed46b81c8e005c11b66c5900..01763cb4c3561fa347ffe39bf3b049b305da1933 100644 (file)
@@ -65,7 +65,7 @@ static int parse_sample(struct action_util *a, int *argc_p, char ***argv_p,
        while (argc > 0) {
                if (matches(*argv, "rate") == 0) {
                        NEXT_ARG();
-                       if (get_unsigned(&rate, *argv, 10) != 0) {
+                       if (get_u32(&rate, *argv, 10) != 0) {
                                fprintf(stderr, "Illegal rate %s\n", *argv);
                                usage();
                                return -1;
@@ -73,7 +73,7 @@ static int parse_sample(struct action_util *a, int *argc_p, char ***argv_p,
                        rate_set = true;
                } else if (matches(*argv, "group") == 0) {
                        NEXT_ARG();
-                       if (get_unsigned(&group, *argv, 10) != 0) {
+                       if (get_u32(&group, *argv, 10) != 0) {
                                fprintf(stderr, "Illegal group num %s\n",
                                        *argv);
                                usage();
@@ -82,7 +82,7 @@ static int parse_sample(struct action_util *a, int *argc_p, char ***argv_p,
                        group_set = true;
                } else if (matches(*argv, "trunc") == 0) {
                        NEXT_ARG();
-                       if (get_unsigned(&trunc, *argv, 10) != 0) {
+                       if (get_u32(&trunc, *argv, 10) != 0) {
                                fprintf(stderr, "Illegal truncation size %s\n",
                                        *argv);
                                usage();