Re: [PATCH iproute2 1/1] tc: use get_u32() in psample action to match types
On Tue, 13 Mar 2018 17:16:23 -0400 Roman Mashakwrote: > Signed-off-by: Roman Mashak Applied
Re: [PATCH iproute2 1/1] tc: use get_u32() in psample action to match types
On Tue, Mar 13, 2018 at 11:16 PM, Roman Mashakwrote: Makes sense :) Acked-by: Yotam Gigi > Signed-off-by: Roman Mashak > --- > tc/m_sample.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tc/m_sample.c b/tc/m_sample.c > index ff5ee6bd1ef6..dff986f5 100644 > --- a/tc/m_sample.c > +++ b/tc/m_sample.c > @@ -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(, *argv, 10) != 0) { > + if (get_u32(, *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(, *argv, 10) != 0) { > + if (get_u32(, *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(, *argv, 10) != 0) { > + if (get_u32(, *argv, 10) != 0) { > fprintf(stderr, "Illegal truncation size > %s\n", > *argv); > usage(); > -- > 2.7.4 >
[PATCH iproute2 1/1] tc: use get_u32() in psample action to match types
Signed-off-by: Roman Mashak--- tc/m_sample.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tc/m_sample.c b/tc/m_sample.c index ff5ee6bd1ef6..dff986f5 100644 --- a/tc/m_sample.c +++ b/tc/m_sample.c @@ -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(, *argv, 10) != 0) { + if (get_u32(, *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(, *argv, 10) != 0) { + if (get_u32(, *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(, *argv, 10) != 0) { + if (get_u32(, *argv, 10) != 0) { fprintf(stderr, "Illegal truncation size %s\n", *argv); usage(); -- 2.7.4