From 8dd7aec896efc0220d6234bcfb190767c30dbb29 Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 24 Jun 2018 00:13:59 +0200 Subject: Change functions to static where possible (Part 1 - common) This fixes issues with plugins defining symbols with the same names Signed-off-by: Haru --- src/common/nullpo.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/common/nullpo.c') 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 #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; } -- cgit v1.2.3-70-g09d2