aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/librc/librc-daemon.c6
-rw-r--r--src/librc/librc-depend.c12
-rw-r--r--src/librc/librc-stringlist.c10
-rw-r--r--src/librc/librc.c6
4 files changed, 17 insertions, 17 deletions
diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c
index dde62f91..c6b87829 100644
--- a/src/librc/librc-daemon.c
+++ b/src/librc/librc-daemon.c
@@ -308,10 +308,10 @@ _match_list(const char *exec, const char *const *argv, const char *pidfile)
if (pidfile) {
l = strlen(pidfile) + 9;
- m = xmalloc(sizeof (char) * l);
+ m = xmalloc(sizeof(char) * l);
snprintf(m, l, "pidfile=%s", pidfile);
rc_stringlist_add(match, m);
- free (m);
+ free(m);
}
return match;
@@ -508,7 +508,7 @@ rc_service_daemons_crashed(const char *service)
if ((fp = fopen(pidfile, "r"))) {
if (fscanf(fp, "%d", &pid) == 1)
retval = false;
- fclose (fp);
+ fclose(fp);
}
free(pidfile);
pidfile = NULL;
diff --git a/src/librc/librc-depend.c b/src/librc/librc-depend.c
index 2e392673..5d6167e7 100644
--- a/src/librc/librc-depend.c
+++ b/src/librc/librc-depend.c
@@ -144,7 +144,7 @@ rc_deptree_load_file(const char *deptree_file)
e = strsep(&p, "_");
if (!e || strcmp(e, "depinfo") != 0)
continue;
- e = strsep (&p, "_");
+ e = strsep(&p, "_");
if (!e || sscanf(e, "%d", &i) != 1)
continue;
if (!(type = strsep(&p, "_=")))
@@ -425,8 +425,8 @@ visit_service(const RC_DEPTREE *deptree,
continue;
provided = get_provided(di, runlevel, options);
TAILQ_FOREACH(p, provided, entries)
- if (strcmp (p->value, depinfo->service) == 0) {
- visit_service (deptree, types, sorted, visited, di,
+ if (strcmp(p->value, depinfo->service) == 0) {
+ visit_service(deptree, types, sorted, visited, di,
runlevel, options | RC_DEP_TRACE);
break;
}
@@ -681,7 +681,7 @@ rc_deptree_update_needed(time_t *newest, char *file)
/* Create base directories if needed */
for (i = 0; depdirs[i]; i++)
if (mkdir(depdirs[i], 0755) != 0 && errno != EEXIST)
- fprintf(stderr, "mkdir `%s': %s\n", depdirs[i], strerror (errno));
+ fprintf(stderr, "mkdir `%s': %s\n", depdirs[i], strerror(errno));
/* Quick test to see if anything we use has changed and we have
* data in our deptree */
@@ -922,7 +922,7 @@ rc_deptree_update(void)
di = get_depinfo(deptree, s->value);
if (!di) {
if (strcmp(deptype->type, "ineed") == 0) {
- fprintf (stderr,
+ fprintf(stderr,
"Service `%s' needs non"
" existent service `%s'\n",
depinfo->service, s->value);
@@ -1032,7 +1032,7 @@ rc_deptree_update(void)
if (TAILQ_FIRST(config)) {
if ((fp = fopen(RC_DEPCONFIG, "w"))) {
TAILQ_FOREACH(s, config, entries)
- fprintf (fp, "%s\n", s->value);
+ fprintf(fp, "%s\n", s->value);
fclose(fp);
} else {
fprintf(stderr, "fopen `%s': %s\n",
diff --git a/src/librc/librc-stringlist.c b/src/librc/librc-stringlist.c
index 818a31cb..22b823b2 100644
--- a/src/librc/librc-stringlist.c
+++ b/src/librc/librc-stringlist.c
@@ -41,7 +41,7 @@ rc_stringlist_new(void)
librc_hidden_def(rc_stringlist_new)
RC_STRING *
-rc_stringlist_add (RC_STRINGLIST *list, const char *value)
+rc_stringlist_add(RC_STRINGLIST *list, const char *value)
{
RC_STRING *s = xmalloc(sizeof(*s));
@@ -52,7 +52,7 @@ rc_stringlist_add (RC_STRINGLIST *list, const char *value)
librc_hidden_def(rc_stringlist_add)
RC_STRING *
-rc_stringlist_addu (RC_STRINGLIST *list, const char *value)
+rc_stringlist_addu(RC_STRINGLIST *list, const char *value)
{
RC_STRING *s;
@@ -74,8 +74,8 @@ rc_stringlist_delete(RC_STRINGLIST *list, const char *value)
TAILQ_FOREACH(s, list, entries)
if (strcmp(s->value, value) == 0) {
TAILQ_REMOVE(list, s, entries);
- free (s->value);
- free (s);
+ free(s->value);
+ free(s);
return true;
}
@@ -127,7 +127,7 @@ rc_stringlist_sort(RC_STRINGLIST **list)
TAILQ_REMOVE(l, s, entries);
last = NULL;
TAILQ_FOREACH(n, new, entries) {
- if (strcmp (s->value, n->value) < 0)
+ if (strcmp(s->value, n->value) < 0)
break;
last = n;
}
diff --git a/src/librc/librc.c b/src/librc/librc.c
index 5feb5d7a..d769eea8 100644
--- a/src/librc/librc.c
+++ b/src/librc/librc.c
@@ -749,7 +749,7 @@ rc_service_state(const char *service)
if (state & RC_SERVICE_STOPPED) {
dirs = ls_dir(RC_SVCDIR "/scheduled", 0);
- TAILQ_FOREACH (dir, dirs, entries) {
+ TAILQ_FOREACH(dir, dirs, entries) {
snprintf(file, sizeof(file),
RC_SVCDIR "/scheduled/%s/%s",
dir->value, service);
@@ -892,7 +892,7 @@ rc_services_in_runlevel_stacked(const char *runlevel)
list = rc_services_in_runlevel(runlevel);
stacks = rc_runlevel_stacks(runlevel);
- TAILQ_FOREACH (stack, stacks, entries) {
+ TAILQ_FOREACH(stack, stacks, entries) {
sl = rc_services_in_runlevel(stack->value);
if (list != NULL) {
TAILQ_CONCAT(list, sl, entries);
@@ -1008,7 +1008,7 @@ rc_services_scheduled_by(const char *service)
RC_STRING *dir;
char file[PATH_MAX];
- TAILQ_FOREACH (dir, dirs, entries) {
+ TAILQ_FOREACH(dir, dirs, entries) {
snprintf(file, sizeof(file), RC_SVCDIR "/scheduled/%s/%s",
dir->value, service);
if (exists(file))