From e6fc30da61f72aa4266dea8f131c0ca7c4a79f4d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Mon, 17 Jan 2011 08:28:43 +0000 Subject: Clean up all trailing whitespace in src/. --- src/librc/librc-daemon.c | 6 +++--- src/librc/librc-depend.c | 12 ++++++------ src/librc/librc-stringlist.c | 2 +- src/librc/librc.c | 16 ++++++++-------- src/librc/rc.h.in | 6 +++--- 5 files changed, 21 insertions(+), 21 deletions(-) (limited to 'src/librc') diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c index 1bedf29..6a45e0c 100644 --- a/src/librc/librc-daemon.c +++ b/src/librc/librc-daemon.c @@ -40,7 +40,7 @@ pid_is_exec(pid_t pid, const char *exec) int c; bool retval = false; - exec = basename_c(exec); + exec = basename_c(exec); snprintf(buffer, sizeof(buffer), "/proc/%d/stat", pid); if ((fp = fopen(buffer, "r"))) { while ((c = getc(fp)) != EOF && c != '(') @@ -297,7 +297,7 @@ _match_list(const char *exec, const char* const* argv, const char *pidfile) rc_stringlist_add(match, m); free(m); } - + while (argv && argv[i]) { l = strlen(*argv) + strlen("argv_=") + 16; m = xmalloc(sizeof(char) * l); @@ -323,7 +323,7 @@ rc_service_daemon_set(const char *service, const char *exec, const char *pidfile, bool started) { char dirpath[PATH_MAX]; - char file[PATH_MAX]; + char file[PATH_MAX]; int nfiles = 0; char oldfile[PATH_MAX] = { '\0' }; bool retval = false; diff --git a/src/librc/librc-depend.c b/src/librc/librc-depend.c index 13f9076..0b25f35 100644 --- a/src/librc/librc-depend.c +++ b/src/librc/librc-depend.c @@ -178,7 +178,7 @@ rc_deptree_load_file(const char *deptree_file) } fclose(fp); free(line); - + return deptree; } @@ -186,7 +186,7 @@ static bool valid_service(const char *runlevel, const char *service, const char *type) { RC_SERVICE state; - + if (!runlevel || strcmp(type, "ineed") == 0 || strcmp(type, "needsme") == 0) @@ -398,7 +398,7 @@ visit_service(const RC_DEPTREE *deptree, if (!(di = get_depinfo(deptree, service->value))) continue; provided = get_provided(di, runlevel, options); - + if (TAILQ_FIRST(provided)) { TAILQ_FOREACH(p, provided, entries) { di = get_depinfo(deptree, p->value); @@ -772,14 +772,14 @@ rc_deptree_update(void) if (!depinfo || strcmp(depinfo->service, service) != 0) { deptype = NULL; depinfo = get_depinfo(deptree, service); - if (!depinfo) { + if (!depinfo) { depinfo = xmalloc(sizeof(*depinfo)); TAILQ_INIT(&depinfo->depends); depinfo->service = xstrdup(service); TAILQ_INSERT_TAIL(deptree, depinfo, entries); } } - + /* We may not have any depends */ if (!type || !depends) continue; @@ -820,7 +820,7 @@ rc_deptree_update(void) depend[l - 2] == 's' && depend[l - 1] == 'h') continue; - + /* Remove our dependency if instructed */ if (depend[0] == '!') { rc_stringlist_delete(deptype->services, depend + 1); diff --git a/src/librc/librc-stringlist.c b/src/librc/librc-stringlist.c index c3825cb..818a31c 100644 --- a/src/librc/librc-stringlist.c +++ b/src/librc/librc-stringlist.c @@ -146,7 +146,7 @@ librc_hidden_def(rc_stringlist_sort) void rc_stringlist_free(RC_STRINGLIST *list) { - RC_STRING *s1; + RC_STRING *s1; RC_STRING *s2; if (!list) diff --git a/src/librc/librc.c b/src/librc/librc.c index 8a9fd79..8d661b1 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -72,7 +72,7 @@ ls_dir(const char *dir, int options) { DIR *dp; struct dirent *d; - RC_STRINGLIST *list = NULL; + RC_STRINGLIST *list = NULL; struct stat buf; size_t l; char file[PATH_MAX]; @@ -209,9 +209,9 @@ rc_sys_v2(void) if(systype) { char* s = systype; // Convert to uppercase - while(s && *s) { + while(s && *s) { if(islower((unsigned char)*s)) - *s = toupper((unsigned char)*s); + *s = toupper((unsigned char)*s); s++; } // Now do detection @@ -247,7 +247,7 @@ rc_sys_v1(void) { #ifdef PREFIX return RC_SYS_PREFIX; -#else +#else #ifdef __FreeBSD__ int jailed = 0; @@ -389,7 +389,7 @@ bool rc_runlevel_stack(const char *dst, const char *src) { char d[PATH_MAX], s[PATH_MAX]; - + if (!rc_runlevel_exists(dst) || !rc_runlevel_exists(src)) return false; snprintf(s, sizeof(s), "../%s", src); @@ -402,7 +402,7 @@ bool rc_runlevel_unstack(const char *dst, const char *src) { char path[PATH_MAX]; - + snprintf(path, sizeof(path), "%s/%s/%s", RC_RUNLEVELDIR, dst, src); return (unlink(path) == 0 ? true : false); } @@ -638,7 +638,7 @@ rc_service_mark(const char *service, const RC_SERVICE state) } skip_state = state; } - + if (state == RC_SERVICE_HOTPLUGGED || state == RC_SERVICE_FAILED) { free(init); return true; @@ -786,7 +786,7 @@ rc_service_value_set(const char *service, const char *option, { FILE *fp; char file[PATH_MAX]; - char *p = file; + char *p = file; p += snprintf(file, sizeof(file), RC_SVCDIR "/options/%s", service); if (mkdir(file, 0755) != 0 && errno != EEXIST) diff --git a/src/librc/rc.h.in b/src/librc/rc.h.in index 7ed8f22..5aad1d5 100644 --- a/src/librc/rc.h.in +++ b/src/librc/rc.h.in @@ -342,7 +342,7 @@ typedef void *RC_DEPTREE; * @param target * @param mtime of newest target * @param filename of the newest target (needs mtime param) - * @return true if source is newer than target, otherwise false */ + * @return true if source is newer than target, otherwise false */ bool rc_newer_than(const char *, const char *, time_t *, char *); /*! Check to see if source is older than target. @@ -351,7 +351,7 @@ bool rc_newer_than(const char *, const char *, time_t *, char *); * @param target * @param mtime of oldest target * @param filename of the oldest target (needs mtime param) - * @return true if source is older than target, otherwise false */ + * @return true if source is older than target, otherwise false */ bool rc_older_than(const char *, const char *, time_t *, char *); /*! Update the cached dependency tree if it's older than any init script, @@ -508,7 +508,7 @@ RC_STRING *rc_stringlist_find(RC_STRINGLIST *, const char *); RC_STRINGLIST *rc_stringlist_split(const char *, const char *); -/*! Sort the list according to C locale +/*! Sort the list according to C locale * @param list to sort */ void rc_stringlist_sort(RC_STRINGLIST **); -- cgit v1.2.3