From: Roman Mashak <mrv@mojatatu.com>
To: stephen@networkplumber.org
Cc: netdev@vger.kernel.org, kernel@mojatatu.com, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us,
Roman Mashak <mrv@mojatatu.com>
Subject: [PATCH iproute2 1/1] tc: use get_u32() in psample action to match types
Date: Tue, 13 Mar 2018 17:16:23 -0400 [thread overview]
Message-ID: <1520975783-8593-1-git-send-email-mrv@mojatatu.com> (raw)
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
---
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..dff986f59999 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(&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();
--
2.7.4
next reply other threads:[~2018-03-13 21:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 21:16 Roman Mashak [this message]
2018-03-14 5:41 ` [PATCH iproute2 1/1] tc: use get_u32() in psample action to match types yotam gigi
2018-03-16 20:40 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1520975783-8593-1-git-send-email-mrv@mojatatu.com \
--to=mrv@mojatatu.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kernel@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox