diff --git a/src/librc/librc.c b/src/librc/librc.c index 2e5266d51..61494310a 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -351,7 +351,7 @@ rc_sys(void) } char * -rc_sysconfdir_get() { +rc_sysconfdir_get(void) { static char path[PATH_MAX] = { 0 }; if (geteuid() != 0) { if (!*path) { @@ -371,7 +371,7 @@ rc_sysconfdir_get() { } char * -rc_svcdir_get() { +rc_svcdir_get(void) { static char path[PATH_MAX] = { 0 }; if (geteuid() != 0) { if (!*path) { @@ -393,7 +393,7 @@ rc_svcdir_get() { } char * -rc_initdir_get() { +rc_initdir_get(void) { static char path[PATH_MAX] = { 0 }; if (!*path) { snprintf(path, PATH_MAX, "%s%s", rc_sysconfdir_get(), RC_INITDIR); @@ -402,7 +402,7 @@ rc_initdir_get() { } char * -rc_confdir_get() { +rc_confdir_get(void) { static char path[PATH_MAX] = { 0 }; if (!*path) { snprintf(path, PATH_MAX, "%s%s", rc_sysconfdir_get(), RC_CONFDIR); @@ -411,7 +411,7 @@ rc_confdir_get() { } char * -rc_runleveldir_get() { +rc_runleveldir_get(void) { static char path[PATH_MAX] = { 0 }; if (!*path) { snprintf(path, PATH_MAX, "%s%s", rc_sysconfdir_get(), RC_RUNLEVELDIR); diff --git a/src/librc/rc.h.in b/src/librc/rc.h.in index 0bbed9a6c..e207ed22a 100644 --- a/src/librc/rc.h.in +++ b/src/librc/rc.h.in @@ -128,11 +128,11 @@ typedef TAILQ_HEAD(rc_stringlist, rc_string) RC_STRINGLIST; bool rc_sysconfdir_set(char *path); bool rc_svcdir_set(char *path); -char *rc_sysconfdir_get(); -char *rc_initdir_get(); -char *rc_confdir_get(); -char *rc_svcdir_get(); -char *rc_runtimedir_get(); +char *rc_sysconfdir_get(void); +char *rc_initdir_get(void); +char *rc_confdir_get(void); +char *rc_svcdir_get(void); +char *rc_runtimedir_get(void); /*! Return the current runlevel. * @return the current runlevel */ diff --git a/src/shared/misc.c b/src/shared/misc.c index 7d9fb96a9..ba60e0cdc 100644 --- a/src/shared/misc.c +++ b/src/shared/misc.c @@ -44,7 +44,7 @@ extern char **environ; char * -rc_deptree_cache_path_get() { +rc_deptree_cache_path_get(void) { static char path[PATH_MAX] = { 0 }; if (!*path) { snprintf(path, PATH_MAX, "%s/%s", @@ -54,7 +54,7 @@ rc_deptree_cache_path_get() { } char * -rc_deptree_skewed_path_get() { +rc_deptree_skewed_path_get(void) { static char path[PATH_MAX] = { 0 }; if (!*path) { snprintf(path, PATH_MAX, "%s/%s", @@ -64,7 +64,7 @@ rc_deptree_skewed_path_get() { } char * -rc_krunlevel_path_get() { +rc_krunlevel_path_get(void) { static char path[PATH_MAX] = { 0 }; if (!*path) { snprintf(path, PATH_MAX, "%s/%s", @@ -73,7 +73,7 @@ rc_krunlevel_path_get() { return path; } char * -rc_starting_path_get() { +rc_starting_path_get(void) { static char path[PATH_MAX] = { 0 }; if (!*path) { snprintf(path, PATH_MAX, "%s/%s", @@ -82,7 +82,7 @@ rc_starting_path_get() { return path; } char * -rc_stopping_path_get() { +rc_stopping_path_get(void) { static char path[PATH_MAX] = { 0 }; if (!*path) { snprintf(path, PATH_MAX, "%s/%s", @@ -92,7 +92,7 @@ rc_stopping_path_get() { } char * -rc_svcdir_starting_get() { +rc_svcdir_starting_get(void) { static char path[PATH_MAX] = { 0 }; if (!*path) { snprintf(path, PATH_MAX, "%s/%s", @@ -102,7 +102,7 @@ rc_svcdir_starting_get() { } char * -rc_svcdir_inactive_get() { +rc_svcdir_inactive_get(void) { static char path[PATH_MAX] = { 0 }; if (!*path) { snprintf(path, PATH_MAX, "%s/%s", @@ -112,7 +112,7 @@ rc_svcdir_inactive_get() { } char * -rc_svcdir_started_get() { +rc_svcdir_started_get(void) { static char path[PATH_MAX] = { 0 }; if (!*path) { snprintf(path, PATH_MAX, "%s/%s", @@ -122,7 +122,7 @@ rc_svcdir_started_get() { } char * -rc_svcdir_coldplugged_get() { +rc_svcdir_coldplugged_get(void) { static char path[PATH_MAX] = { 0 }; if (!*path) { snprintf(path, PATH_MAX, "%s/%s", diff --git a/src/shared/misc.h b/src/shared/misc.h index 56b21b589..96265472f 100644 --- a/src/shared/misc.h +++ b/src/shared/misc.h @@ -42,17 +42,16 @@ #define RC_SVCDIR_STARTED "started" #define RC_SVCDIR_COLDPLUGGED "coldplugged" -char *rc_deptree_cache_path_get(); -char *rc_deptree_skewed_path_get(); -char *rc_krunlevel_path_get(); -char *rc_starting_path_get(); -char *rc_stopping_path_get(); - -char *rc_svcdir_starting_get(); -char *rc_svcdir_inactive_get(); -char *rc_svcdir_started_get(); -char *rc_svcdir_coldplugged_get(); - +char *rc_deptree_cache_path_get(void); +char *rc_deptree_skewed_path_get(void); +char *rc_krunlevel_path_get(void); +char *rc_starting_path_get(void); +char *rc_stopping_path_get(void); + +char *rc_svcdir_starting_get(void); +char *rc_svcdir_inactive_get(void); +char *rc_svcdir_started_get(void); +char *rc_svcdir_coldplugged_get(void); char *rc_conf_value(const char *var); bool rc_conf_yesno(const char *var);