Skip to content

Commit

Permalink
Fix function prototype warning
Browse files Browse the repository at this point in the history
Signed-off-by: anna <[email protected]>
  • Loading branch information
navi-desu committed Jan 20, 2023
1 parent d81914b commit ef2ce86
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 30 deletions.
10 changes: 5 additions & 5 deletions src/librc/librc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions src/librc/rc.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
18 changes: 9 additions & 9 deletions src/shared/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
21 changes: 10 additions & 11 deletions src/shared/misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ef2ce86

Please sign in to comment.