diff mbox

[libnftnl,4/7] expr/limit: Drop unreachable code in limit_to_type()

Message ID 1470958419-32602-5-git-send-email-phil@nwl.cc
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Phil Sutter Aug. 11, 2016, 11:33 p.m. UTC
The function returns from inside the switch() in any case, so the final
return statement is never reached.

Fixes: 7769cbd9dfe69 ("expr: limit: add per-byte limiting support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 src/expr/limit.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox

Patch

diff --git a/src/expr/limit.c b/src/expr/limit.c
index 4bd096e8e921c..cdff81d620caa 100644
--- a/src/expr/limit.c
+++ b/src/expr/limit.c
@@ -259,7 +259,6 @@  static const char *limit_to_type(enum nft_limit_type type)
 	case NFT_LIMIT_PKT_BYTES:
 		return "bytes";
 	}
-	return "unknown";
 }
 
 static int nftnl_expr_limit_snprintf_default(char *buf, size_t len,