summaryrefslogtreecommitdiff
path: root/src/common/nullpo.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-06-24 00:13:59 +0200
committerHaru <haru@dotalux.com>2018-07-01 21:09:24 +0200
commit8dd7aec896efc0220d6234bcfb190767c30dbb29 (patch)
tree0fd1b8d2b795c01b4a6fddc3827784d26d09cc61 /src/common/nullpo.c
parentec1bc50b01aa4f34f151b3b3800011abdce31919 (diff)
downloadhercules-8dd7aec896efc0220d6234bcfb190767c30dbb29.tar.gz
hercules-8dd7aec896efc0220d6234bcfb190767c30dbb29.tar.bz2
hercules-8dd7aec896efc0220d6234bcfb190767c30dbb29.tar.xz
hercules-8dd7aec896efc0220d6234bcfb190767c30dbb29.zip
Change functions to static where possible (Part 1 - common)
This fixes issues with plugins defining symbols with the same names Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/nullpo.c')
-rw-r--r--src/common/nullpo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/common/nullpo.c b/src/common/nullpo.c
index 1441ff853..e19f7f846 100644
--- a/src/common/nullpo.c
+++ b/src/common/nullpo.c
@@ -32,7 +32,7 @@
#include <execinfo.h>
#endif // HAVE_EXECINFO
-struct nullpo_interface nullpo_s;
+static struct nullpo_interface nullpo_s;
struct nullpo_interface *nullpo;
/**
@@ -44,7 +44,8 @@ struct nullpo_interface *nullpo;
* @param targetname Name of the checked symbol
* @param title Message title to display (i.e. failed assertion or nullpo info)
*/
-void assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) {
+static void assert_report(const char *file, int line, const char *func, const char *targetname, const char *title)
+{
#ifdef HAVE_EXECINFO
void *array[10];
int size;
@@ -72,7 +73,8 @@ void assert_report(const char *file, int line, const char *func, const char *tar
/**
*
**/
-void nullpo_defaults(void) {
+void nullpo_defaults(void)
+{
nullpo = &nullpo_s;
nullpo->assert_report = assert_report;
}