Netdev List
 help / color / mirror / Atom feed
* [PATCH iproute2 1/1] tc: use get_u32() in psample action to match types
@ 2018-03-13 21:16 Roman Mashak
  2018-03-14  5:41 ` yotam gigi
  2018-03-16 20:40 ` Stephen Hemminger
  0 siblings, 2 replies; 3+ messages in thread
From: Roman Mashak @ 2018-03-13 21:16 UTC (permalink / raw)
  To: stephen; +Cc: netdev, kernel, jhs, xiyou.wangcong, jiri, Roman Mashak

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-16 20:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-13 21:16 [PATCH iproute2 1/1] tc: use get_u32() in psample action to match types Roman Mashak
2018-03-14  5:41 ` yotam gigi
2018-03-16 20:40 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox