]> git.ipfire.org Git - thirdparty/libnftnl.git/commitdiff
expr/tunnel: Kill dead code
authorPhil Sutter <phil@nwl.cc>
Sat, 19 Dec 2020 01:21:44 +0000 (02:21 +0100)
committerPhil Sutter <phil@nwl.cc>
Tue, 9 Mar 2021 13:23:13 +0000 (14:23 +0100)
Function str2tunnel_key() was never used.

Fixes: 42468fb6df61a ("expr: add support for matching tunnel metadata")
Signed-off-by: Phil Sutter <phil@nwl.cc>
src/expr/tunnel.c

index b2b8d7243a26c776bb465662191e83c9cd485130..62e164805fee6117299e68ec525785c9bde4647b 100644 (file)
@@ -124,19 +124,6 @@ static const char *tunnel_key2str(uint8_t key)
        return "unknown";
 }
 
-static inline int str2tunnel_key(const char *str)
-{
-       int i;
-
-       for (i = 0; i <= NFT_TUNNEL_MAX; i++) {
-               if (strcmp(str, tunnel_key2str_array[i]) == 0)
-                       return i;
-       }
-
-       errno = EINVAL;
-       return -1;
-}
-
 static int
 nftnl_expr_tunnel_snprintf_default(char *buf, size_t len,
                                 const struct nftnl_expr *e)