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

Fixes: 038d226f2e6cc ("src: Add support for native socket matching")
Signed-off-by: Phil Sutter <phil@nwl.cc>
src/expr/socket.c

index 8cd4536a7a8e6b3e5ac5d46cb8da42282547a53c..76fc90346141e1eb9e5b0d23b2d14f153d877774 100644 (file)
@@ -126,19 +126,6 @@ static const char *socket_key2str(uint8_t key)
        return "unknown";
 }
 
-static inline int str2socket_key(const char *str)
-{
-       int i;
-
-       for (i = 0; i < NFT_SOCKET_MAX + 1; i++) {
-               if (strcmp(str, socket_key2str_array[i]) == 0)
-                       return i;
-       }
-
-       errno = EINVAL;
-       return -1;
-}
-
 static int
 nftnl_expr_socket_snprintf_default(char *buf, size_t len,
                               const struct nftnl_expr *e)