libctrl: Mark the cmd set/get/verify functions static
diff --git a/openbsc/include/openbsc/control_cmd.h b/openbsc/include/openbsc/control_cmd.h
index 82252cb..24292ea 100644
--- a/openbsc/include/openbsc/control_cmd.h
+++ b/openbsc/include/openbsc/control_cmd.h
@@ -80,7 +80,7 @@
 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 @@
 	} \
 	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 @@
 }
 
 #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 @@
 	} \
 	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 @@
 }
 
 #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, \
diff --git a/openbsc/src/libctrl/control_if.c b/openbsc/src/libctrl/control_if.c
index 49e2ab1..8198ae6 100644
--- a/openbsc/src/libctrl/control_if.c
+++ b/openbsc/src/libctrl/control_if.c
@@ -436,7 +436,7 @@
 
 /* rate_ctr */
 CTRL_CMD_DEFINE(rate_ctr, "rate_ctr *");
-int get_rate_ctr(struct ctrl_cmd *cmd, void *data)
+static int get_rate_ctr(struct ctrl_cmd *cmd, void *data)
 {
 	int intv;
 	unsigned int idx;
@@ -529,21 +529,21 @@
 	return CTRL_CMD_ERROR;
 }
 
-int set_rate_ctr(struct ctrl_cmd *cmd, void *data)
+static int set_rate_ctr(struct ctrl_cmd *cmd, void *data)
 {
 	cmd->reply = "Can't set rate counter.";
 
 	return CTRL_CMD_ERROR;
 }
 
-int verify_rate_ctr(struct ctrl_cmd *cmd, const char *value, void *data)
+static int verify_rate_ctr(struct ctrl_cmd *cmd, const char *value, void *data)
 {
 	return 0;
 }
 
 /* counter */
 CTRL_CMD_DEFINE(counter, "counter *");
-int get_counter(struct ctrl_cmd *cmd, void *data)
+static int get_counter(struct ctrl_cmd *cmd, void *data)
 {
 	char *ctr_name, *tmp, *dup, *saveptr;
 	struct osmo_counter *counter;
@@ -586,7 +586,7 @@
 	return CTRL_CMD_ERROR;
 }
 
-int set_counter(struct ctrl_cmd *cmd, void *data)
+static int set_counter(struct ctrl_cmd *cmd, void *data)
 {
 
 	cmd->reply = "Can't set counter.";
@@ -594,7 +594,7 @@
 	return CTRL_CMD_ERROR;
 }
 
-int verify_counter(struct ctrl_cmd *cmd, const char *value, void *data)
+static int verify_counter(struct ctrl_cmd *cmd, const char *value, void *data)
 {
 	return 0;
 }
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c b/openbsc/src/osmo-bsc/osmo_bsc_main.c
index d8950da..9a799c0 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_main.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c
@@ -182,7 +182,7 @@
 
 static LLIST_HEAD(locations);
 
-void cleanup_locations()
+static void cleanup_locations()
 {
 	struct location *myloc, *tmp;
 	int invalpos = 0, i = 0;
@@ -211,7 +211,7 @@
 }
 
 CTRL_CMD_DEFINE(net_loc, "location");
-int get_net_loc(struct ctrl_cmd *cmd, void *data)
+static int get_net_loc(struct ctrl_cmd *cmd, void *data)
 {
 	struct location *myloc;
 
@@ -231,7 +231,7 @@
 	return CTRL_CMD_REPLY;
 }
 
-int set_net_loc(struct ctrl_cmd *cmd, void *data)
+static int set_net_loc(struct ctrl_cmd *cmd, void *data)
 {
 	char *saveptr, *lat, *lon, *height, *age, *valid, *tmp;
 	struct location *myloc;
@@ -271,7 +271,7 @@
 	return CTRL_CMD_ERROR;
 }
 
-int verify_net_loc(struct ctrl_cmd *cmd, const char *value, void *data)
+static int verify_net_loc(struct ctrl_cmd *cmd, const char *value, void *data)
 {
 	char *saveptr, *latstr, *lonstr, *heightstr, *agestr, *validstr, *tmp;
 	unsigned long age;
@@ -307,7 +307,7 @@
 }
 
 CTRL_CMD_DEFINE(trx_rf_lock, "rf_locked");
-int get_trx_rf_lock(struct ctrl_cmd *cmd, void *data)
+static int get_trx_rf_lock(struct ctrl_cmd *cmd, void *data)
 {
 	struct gsm_bts_trx *trx = cmd->node;
 	if (!trx) {
@@ -319,7 +319,7 @@
 	return CTRL_CMD_REPLY;
 }
 
-int set_trx_rf_lock(struct ctrl_cmd *cmd, void *data)
+static int set_trx_rf_lock(struct ctrl_cmd *cmd, void *data)
 {
 	int locked = atoi(cmd->value);
 	struct gsm_bts_trx *trx = cmd->node;
@@ -333,7 +333,7 @@
 	return get_trx_rf_lock(cmd, data);
 }
 
-int verify_trx_rf_lock(struct ctrl_cmd *cmd, const char *value, void *data)
+static int verify_trx_rf_lock(struct ctrl_cmd *cmd, const char *value, void *data)
 {
 	int locked = atoi(cmd->value);
 
@@ -344,13 +344,13 @@
 }
 
 CTRL_CMD_DEFINE(net_rf_lock, "rf_locked");
-int get_net_rf_lock(struct ctrl_cmd *cmd, void *data)
+static int get_net_rf_lock(struct ctrl_cmd *cmd, void *data)
 {
 	cmd->reply = "get only works for the individual trx properties.";
 	return CTRL_CMD_ERROR;
 }
 
-int set_net_rf_lock(struct ctrl_cmd *cmd, void *data)
+static int set_net_rf_lock(struct ctrl_cmd *cmd, void *data)
 {
 	int locked = atoi(cmd->value);
 	struct gsm_network *net = cmd->node;
@@ -376,7 +376,7 @@
 	return CTRL_CMD_REPLY;
 }
 
-int verify_net_rf_lock(struct ctrl_cmd *cmd, const char *value, void *data)
+static int verify_net_rf_lock(struct ctrl_cmd *cmd, const char *value, void *data)
 {
 	int locked = atoi(cmd->value);
 
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index 6e4282b..295535a 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -1686,17 +1686,17 @@
 }
 
 CTRL_CMD_DEFINE(fwd_cmd, "bsc *");
-int get_fwd_cmd(struct ctrl_cmd *cmd, void *data)
+static int get_fwd_cmd(struct ctrl_cmd *cmd, void *data)
 {
 	return forward_to_bsc(cmd);
 }
 
-int set_fwd_cmd(struct ctrl_cmd *cmd, void *data)
+static int set_fwd_cmd(struct ctrl_cmd *cmd, void *data)
 {
 	return forward_to_bsc(cmd);
 }
 
-int verify_fwd_cmd(struct ctrl_cmd *cmd, const char *value, void *data)
+static int verify_fwd_cmd(struct ctrl_cmd *cmd, const char *value, void *data)
 {
 	return 0;
 }