Auto-Merge pull request #2779 from rpv-tomsk/tmpfix
authorcollectd bot <32910397+collectd-bot@users.noreply.github.com>
Wed, 16 May 2018 13:13:12 +0000 (15:13 +0200)
committerGitHub <noreply@github.com>
Wed, 16 May 2018 13:13:12 +0000 (15:13 +0200)
Automatically merged due to "Automerge" label

src/utils_cmd_listval.c
src/utils_cmd_listval.h
src/utils_cmds.c
src/utils_cmds.h

index df23a95..24ec942 100644 (file)
@@ -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 */
index 6abdeee..6dbaabc 100644 (file)
 #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 */
index fe57d5a..88fdfc7 100644 (file)
@@ -206,8 +206,7 @@ cmd_status_t cmd_parsev(size_t argc, char **argv, cmd_t *ret_cmd,
         cmd_parse_getval(argc - 1, argv + 1, &ret_cmd->cmd.getval, opts, err);
   } 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);
+    status = cmd_parse_listval(argc - 1, argv + 1, opts, err);
   } else if (strcasecmp("PUTVAL", command) == 0) {
     ret_cmd->type = CMD_PUTVAL;
     status =
@@ -252,7 +251,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);
index 26d5338..f3882f5 100644 (file)
@@ -39,13 +39,13 @@ typedef enum {
   CMD_PUTVAL = 4,
 } cmd_type_t;
 #define CMD_TO_STRING(type)                                                    \
-  ((type) == CMD_FLUSH) ? "FLUSH" : ((type) == CMD_GETVAL)                     \
-                                        ? "GETVAL"                             \
-                                        : ((type) == CMD_LISTVAL)              \
-                                              ? "LISTVAL"                      \
-                                              : ((type) == CMD_PUTVAL)         \
-                                                    ? "PUTVAL"                 \
-                                                    : "UNKNOWN"
+  ((type) == CMD_FLUSH)                                                        \
+      ? "FLUSH"                                                                \
+      : ((type) == CMD_GETVAL)                                                 \
+            ? "GETVAL"                                                         \
+            : ((type) == CMD_LISTVAL)                                          \
+                  ? "LISTVAL"                                                  \
+                  : ((type) == CMD_PUTVAL) ? "PUTVAL" : "UNKNOWN"
 
 typedef struct {
   double timeout;
@@ -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;