summaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2011-08-05 11:48:18 +0200
committerHarald Welte <laforge@gnumonks.org>2014-08-21 15:34:13 +0200
commitf7c74e58799850661b34b81137b994993a40ddd2 (patch)
tree818217a29792216bcff253ddde11c74b6adea738 /openbsc/include
parentb06dd3010fa6740c996f0cbffe5b64e801b78ef0 (diff)
libctrl: Mark the cmd set/get/verify functions static
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/control_cmd.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/openbsc/include/openbsc/control_cmd.h b/openbsc/include/openbsc/control_cmd.h
index 82252cb6..24292ead 100644
--- a/openbsc/include/openbsc/control_cmd.h
+++ b/openbsc/include/openbsc/control_cmd.h
@@ -80,7 +80,7 @@ struct msgb *ctrl_cmd_make(struct ctrl_cmd *cmd);
struct ctrl_cmd *ctrl_cmd_cpy(void *ctx, struct ctrl_cmd *cmd);
#define CTRL_CMD_DEFINE_RANGE(cmdname, cmdstr, dtype, element, min, max) \
-int get_##cmdname(struct ctrl_cmd *cmd, void *data) \
+static int get_##cmdname(struct ctrl_cmd *cmd, void *data) \
{ \
dtype *node = data; \
cmd->reply = talloc_asprintf(cmd, "%i", node->element); \
@@ -90,14 +90,14 @@ int get_##cmdname(struct ctrl_cmd *cmd, void *data) \
} \
return CTRL_CMD_REPLY; \
} \
-int set_##cmdname(struct ctrl_cmd *cmd, void *data) \
+static int set_##cmdname(struct ctrl_cmd *cmd, void *data) \
{ \
dtype *node = data; \
int tmp = atoi(cmd->value); \
node->element = tmp; \
return get_##cmdname(cmd, data); \
} \
-int verify_##cmdname(struct ctrl_cmd *cmd, const char *value, void *data) \
+static int verify_##cmdname(struct ctrl_cmd *cmd, const char *value, void *data) \
{ \
int tmp = atoi(value); \
if ((tmp >= min)&&(tmp <= max)) { \
@@ -114,7 +114,7 @@ struct ctrl_cmd_element cmd_##cmdname = { \
}
#define CTRL_CMD_DEFINE_STRING(cmdname, cmdstr, dtype, element) \
-int get_##cmdname(struct ctrl_cmd *cmd, dtype *data) \
+static int get_##cmdname(struct ctrl_cmd *cmd, dtype *data) \
{ \
cmd->reply = talloc_asprintf(cmd, "%s", data->element); \
if (!cmd->reply) { \
@@ -123,7 +123,7 @@ int get_##cmdname(struct ctrl_cmd *cmd, dtype *data) \
} \
return CTRL_CMD_REPLY; \
} \
-int set_##cmdname(struct ctrl_cmd *cmd, dtype *data) \
+static int set_##cmdname(struct ctrl_cmd *cmd, dtype *data) \
{ \
bsc_replace_string(cmd->node, &data->element, cmd->value); \
return get_##cmdname(cmd, data); \
@@ -137,9 +137,9 @@ struct ctrl_cmd_element cmd_##cmdname = { \
}
#define CTRL_CMD_DEFINE(cmdname, cmdstr) \
-int get_##cmdname(struct ctrl_cmd *cmd, void *data); \
-int set_##cmdname(struct ctrl_cmd *cmd, void *data); \
-int verify_##cmdname(struct ctrl_cmd *cmd, const char *value, void *data); \
+static int get_##cmdname(struct ctrl_cmd *cmd, void *data); \
+static int set_##cmdname(struct ctrl_cmd *cmd, void *data); \
+static int verify_##cmdname(struct ctrl_cmd *cmd, const char *value, void *data); \
struct ctrl_cmd_element cmd_##cmdname = { \
.name = cmdstr, \
.param = NULL, \