diff options
author | Brett Mastbergen <bmastbergen@untangle.com> | 2020-01-03 14:36:40 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-01-05 10:31:26 +0100 |
commit | 325cb6f592cda0e9fb1769e4ebd209616fc7e6a1 (patch) | |
tree | d90fefe27d81a0c9e8f19a1559102ce80f9c864f /src/utils.c | |
parent | 6079297fffbd59fbdad40bc3651576d30989e2cc (diff) |
include: Remove buffer.h
Almost everything in this header is unused. The command defines
used in utils.c don't seem to be justified and have just been
replaced by their strings
Signed-off-by: Brett Mastbergen <bmastbergen@untangle.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/utils.c b/src/utils.c index f641bf9..3617837 100644 --- a/src/utils.c +++ b/src/utils.c @@ -242,11 +242,11 @@ enum nftnl_cmd_type nftnl_flag2cmd(uint32_t flags) } static const char *cmd2tag[NFTNL_CMD_MAX] = { - [NFTNL_CMD_ADD] = ADD, - [NFTNL_CMD_INSERT] = INSERT, - [NFTNL_CMD_DELETE] = DELETE, - [NFTNL_CMD_REPLACE] = REPLACE, - [NFTNL_CMD_FLUSH] = FLUSH, + [NFTNL_CMD_ADD] = "add", + [NFTNL_CMD_INSERT] = "insert", + [NFTNL_CMD_DELETE] = "delete", + [NFTNL_CMD_REPLACE] = "replace", + [NFTNL_CMD_FLUSH] = "flush", }; const char *nftnl_cmd2tag(enum nftnl_cmd_type cmd) @@ -259,15 +259,15 @@ const char *nftnl_cmd2tag(enum nftnl_cmd_type cmd) uint32_t nftnl_str2cmd(const char *cmd) { - if (strcmp(cmd, ADD) == 0) + if (strcmp(cmd, "add") == 0) return NFTNL_CMD_ADD; - else if (strcmp(cmd, INSERT) == 0) + else if (strcmp(cmd, "insert") == 0) return NFTNL_CMD_INSERT; - else if (strcmp(cmd, DELETE) == 0) + else if (strcmp(cmd, "delete") == 0) return NFTNL_CMD_DELETE; - else if (strcmp(cmd, REPLACE) == 0) + else if (strcmp(cmd, "replace") == 0) return NFTNL_CMD_REPLACE; - else if (strcmp(cmd, FLUSH) == 0) + else if (strcmp(cmd, "flush") == 0) return NFTNL_CMD_FLUSH; return NFTNL_CMD_UNSPEC; |