aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-05-15 17:27:12 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-05-15 17:28:03 +0200
commit20f6e946e13849ffb2d2a1d2a61dd00f7b8cdd11 (patch)
tree03b47bb9f7e34265f43c34dba7ce6330297a250b
parentb66f158b050503a68468aa55ae6e7b7df92e3fb8 (diff)
ctrl: Use CTRL_CMD_DEFINE_STRUCT in CTRL_CMD_DEFINE_RANGE
Jacob pointed out that I didn't convert CTRL_CMD_DEFINE_RANGE. This patch is doing it now.
-rw-r--r--openbsc/include/openbsc/control_cmd.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/openbsc/include/openbsc/control_cmd.h b/openbsc/include/openbsc/control_cmd.h
index 4d2020366..2e6863a94 100644
--- a/openbsc/include/openbsc/control_cmd.h
+++ b/openbsc/include/openbsc/control_cmd.h
@@ -129,12 +129,7 @@ static int verify_##cmdname(struct ctrl_cmd *cmd, const char *value, void *_data
CTRL_HELPER_GET_INT(cmdname, dtype, element) \
CTRL_HELPER_SET_INT(cmdname, dtype, element) \
CTRL_HELPER_VERIFY_RANGE(cmdname, min, max) \
-static struct ctrl_cmd_element cmd_##cmdname = { \
- .name = cmdstr, \
- .get = &get_##cmdname, \
- .set = &set_##cmdname, \
- .verify = &verify_##cmdname, \
-}
+CTRL_CMD_DEFINE_STRUCT(cmdname, cmdstr, verify_##cmdname)
#define CTRL_HELPER_GET_STRING(cmdname, dtype, element) \
static int get_##cmdname(struct ctrl_cmd *cmd, void *_data) \