[PATCH] tc/m_gact: Fix action_a2n() return code check

Subsystems: the rest

STALE3662d

2 messages, 2 authors, 2016-08-08 · open the first message on its own page

[PATCH] tc/m_gact: Fix action_a2n() return code check

From: Phil Sutter <phil@nwl.cc>
Date: 2016-08-07 11:16:24

The function returns zero on success.

Reported-by: Mark Bloch <redacted>
Fixes: 69f5aff63c770b ("tc: use action_a2n() everywhere")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 tc/m_gact.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tc/m_gact.c b/tc/m_gact.c
index c0a938c716b6a..2bfd9a7c317e4 100644
--- a/tc/m_gact.c
+++ b/tc/m_gact.c
@@ -73,7 +73,7 @@ get_act(char ***argv_p)
 {
 	int n;
 
-	if (!action_a2n(**argv_p, &n, false)) {
+	if (action_a2n(**argv_p, &n, false)) {
 		fprintf(stderr, "bad action type %s\n", **argv_p);
 		return -10;
 	}
-- 
2.9.0

Re: [PATCH] tc/m_gact: Fix action_a2n() return code check

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2016-08-08 15:55:19

On Sun,  7 Aug 2016 13:19:01 +0200
Phil Sutter [off-list ref] wrote:
The function returns zero on success.

Reported-by: Mark Bloch <redacted>
Fixes: 69f5aff63c770b ("tc: use action_a2n() everywhere")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Applied
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help