From 0e7b67c3d971dceb662fbd161a34501c9929f874 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 15 May 2014 17:27:12 +0200 Subject: 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. --- openbsc/include/openbsc/control_cmd.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/openbsc/include/openbsc/control_cmd.h b/openbsc/include/openbsc/control_cmd.h index 4d202036..2e6863a9 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) \ -- cgit v1.2.3