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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 src/expr/limit.c | 1 -
 1 file changed, 1 deletion(-)

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,
-- 
2.8.2

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux