summaryrefslogtreecommitdiff
path: root/src/common/socket.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-06-24 05:11:00 +0200
committerHaru <haru@dotalux.com>2018-07-01 21:09:25 +0200
commit2e89d5b2824801ed49c62db9f6743f32593018bc (patch)
tree5659b4d335b9d4f707506c76f025eaf1d5cfb6e3 /src/common/socket.c
parent8dd7aec896efc0220d6234bcfb190767c30dbb29 (diff)
downloadhercules-2e89d5b2824801ed49c62db9f6743f32593018bc.tar.gz
hercules-2e89d5b2824801ed49c62db9f6743f32593018bc.tar.bz2
hercules-2e89d5b2824801ed49c62db9f6743f32593018bc.tar.xz
hercules-2e89d5b2824801ed49c62db9f6743f32593018bc.zip
Fix some warnings caused by static functions defined and unused
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/socket.c')
-rw-r--r--src/common/socket.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/common/socket.c b/src/common/socket.c
index 6119a5341..290c7a1b3 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -78,8 +78,6 @@
static struct socket_interface sockt_s;
struct socket_interface *sockt;
-static struct socket_data **session;
-
static const char *SOCKET_CONF_FILENAME = "conf/common/socket.conf";
#ifdef SEND_SHORTLIST
@@ -1332,6 +1330,7 @@ static bool access_list_add(struct config_setting_t *setting, const char *list_n
#endif // MINICORE
//////////////////////////////
+#ifndef MINICORE
/**
* Reads 'socket_configuration/ip_rules' and initializes required variables.
*
@@ -1343,7 +1342,6 @@ static bool access_list_add(struct config_setting_t *setting, const char *list_n
*/
static bool socket_config_read_iprules(const char *filename, struct config_t *config, bool imported)
{
-#ifndef MINICORE
struct config_setting_t *setting = NULL;
const char *temp = NULL;
@@ -1386,11 +1384,12 @@ static bool socket_config_read_iprules(const char *filename, struct config_t *co
} else {
access_list_add(setting, "deny_list", &access_deny);
}
-#endif // ! MINICORE
return true;
}
+#endif // ! MINICORE
+#ifndef MINICORE
/**
* Reads 'socket_configuration/ddos' and initializes required variables.
*
@@ -1402,7 +1401,6 @@ static bool socket_config_read_iprules(const char *filename, struct config_t *co
*/
static bool socket_config_read_ddos(const char *filename, struct config_t *config, bool imported)
{
-#ifndef MINICORE
struct config_setting_t *setting = NULL;
nullpo_retr(false, filename);
@@ -1419,9 +1417,9 @@ static bool socket_config_read_ddos(const char *filename, struct config_t *confi
libconfig->setting_lookup_int(setting, "count", &ddos_count);
libconfig->setting_lookup_int(setting, "autoreset", &ddos_autoreset);
-#endif // ! MINICORE
return true;
}
+#endif // ! MINICORE
/**
* Reads 'socket_configuration' and initializes required variables.