From: Pavel Rochnyack Date: Wed, 16 May 2018 12:40:08 +0000 (+0700) Subject: Remove empty `cmd_listval_t` data structure and related no-op code. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=aaa294ed9419515d6f84d20e891bc7cb0a49d4da;p=collectd.git Remove empty `cmd_listval_t` data structure and related no-op code. Closes: #2739 --- diff --git a/src/utils_cmd_listval.c b/src/utils_cmd_listval.c index df23a954..24ec9421 100644 --- a/src/utils_cmd_listval.c +++ b/src/utils_cmd_listval.c @@ -34,8 +34,6 @@ #include "utils_parse_option.h" cmd_status_t cmd_parse_listval(size_t argc, char **argv, - cmd_listval_t *ret_listval - __attribute__((unused)), const cmd_options_t *opts __attribute__((unused)), cmd_error_handler_t *err) { @@ -103,7 +101,3 @@ cmd_status_t cmd_handle_listval(FILE *fh, char *buffer) { free_everything_and_return(CMD_OK); } /* cmd_status_t cmd_handle_listval */ - -void cmd_destroy_listval(cmd_listval_t *listval __attribute__((unused))) { - /* nothing to do */ -} /* void cmd_destroy_listval */ diff --git a/src/utils_cmd_listval.h b/src/utils_cmd_listval.h index 6abdeee3..6dbaabcb 100644 --- a/src/utils_cmd_listval.h +++ b/src/utils_cmd_listval.h @@ -32,12 +32,9 @@ #include "utils_cmds.h" cmd_status_t cmd_parse_listval(size_t argc, char **argv, - cmd_listval_t *ret_listval, const cmd_options_t *opts, cmd_error_handler_t *err); cmd_status_t cmd_handle_listval(FILE *fh, char *buffer); -void cmd_destroy_listval(cmd_listval_t *listval); - #endif /* UTILS_CMD_LISTVAL_H */ diff --git a/src/utils_cmds.c b/src/utils_cmds.c index fe57d5a2..261a8287 100644 --- a/src/utils_cmds.c +++ b/src/utils_cmds.c @@ -207,7 +207,7 @@ cmd_status_t cmd_parsev(size_t argc, char **argv, cmd_t *ret_cmd, } else if (strcasecmp("LISTVAL", command) == 0) { ret_cmd->type = CMD_LISTVAL; status = - cmd_parse_listval(argc - 1, argv + 1, &ret_cmd->cmd.listval, opts, err); + cmd_parse_listval(argc - 1, argv + 1, opts, err); } else if (strcasecmp("PUTVAL", command) == 0) { ret_cmd->type = CMD_PUTVAL; status = @@ -252,7 +252,6 @@ void cmd_destroy(cmd_t *cmd) { cmd_destroy_getval(&cmd->cmd.getval); break; case CMD_LISTVAL: - cmd_destroy_listval(&cmd->cmd.listval); break; case CMD_PUTVAL: cmd_destroy_putval(&cmd->cmd.putval); diff --git a/src/utils_cmds.h b/src/utils_cmds.h index 26d5338d..c5c8608b 100644 --- a/src/utils_cmds.h +++ b/src/utils_cmds.h @@ -62,9 +62,6 @@ typedef struct { } cmd_getval_t; typedef struct { -} cmd_listval_t; - -typedef struct { /* The raw identifier as provided by the user. */ char *raw_identifier; @@ -86,7 +83,6 @@ typedef struct { union { cmd_flush_t flush; cmd_getval_t getval; - cmd_listval_t listval; cmd_putval_t putval; } cmd; } cmd_t;