code style: remove space after unary "not" operator
There are no semantic changes in this commit. Suggested-by: Mike Frysinger <vapier@gentoo.org> See: https://github.com/OpenRC/openrc/pull/435#pullrequestreview-727035394
This commit is contained in:
committed by
Mike Frysinger
parent
703bdbf88e
commit
8ffc4162e2
@@ -43,7 +43,7 @@ static int syslog_decode(char *name, const CODE *codetab)
|
||||
return atoi(name);
|
||||
|
||||
for (c = codetab; c->c_name; c++)
|
||||
if (! strcasecmp(name, c->c_name))
|
||||
if (!strcasecmp(name, c->c_name))
|
||||
return c->c_val;
|
||||
|
||||
return -1;
|
||||
|
@@ -43,7 +43,7 @@ int main(int argc, char **argv)
|
||||
if (service == NULL)
|
||||
eerrorx("%s: no service specified", applet);
|
||||
|
||||
if (argc < 2 || ! argv[1] || *argv[1] == '\0')
|
||||
if (argc < 2 || !argv[1] || *argv[1] == '\0')
|
||||
eerrorx("%s: no option specified", applet);
|
||||
|
||||
if (strcmp(applet, "service_get_value") == 0 ||
|
||||
|
@@ -78,7 +78,7 @@ static int mount_proc(void)
|
||||
syslog(LOG_ERR, "mount returned non-zero exit status");
|
||||
break;
|
||||
}
|
||||
if (! exists("/proc/version")) {
|
||||
if (!exists("/proc/version")) {
|
||||
syslog(LOG_ERR, "Could not mount /proc");
|
||||
return -1;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ static bool is_user_process(pid_t pid)
|
||||
continue;
|
||||
}
|
||||
temp_pid = -1;
|
||||
while (! feof(fp)) {
|
||||
while (!feof(fp)) {
|
||||
buf = NULL;
|
||||
if (getline(&buf, &size, fp) != -1) {
|
||||
sscanf(buf, "PPid: %d", &temp_pid);
|
||||
|
@@ -161,7 +161,7 @@ process_mount(RC_STRINGLIST *list, struct args *args,
|
||||
TAILQ_FOREACH(s, args->mounts, entries)
|
||||
if (strcmp(s->value, to) == 0)
|
||||
break;
|
||||
if (! s)
|
||||
if (!s)
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ find_mounts(struct args *args)
|
||||
if (flags & o->o_opt) {
|
||||
if (o->o_opt == MNT_LOCAL)
|
||||
netdev = 1;
|
||||
if (! options)
|
||||
if (!options)
|
||||
options = xstrdup(o->o_name);
|
||||
else {
|
||||
xasprintf(&tmp, "%s,%s", options, o->o_name);
|
||||
@@ -475,7 +475,7 @@ int main(int argc, char **argv)
|
||||
if (skip_point_regex &&
|
||||
regexec(skip_point_regex, s->value, 0, NULL, 0) == 0)
|
||||
continue;
|
||||
if (! rc_yesno(getenv("EINFO_QUIET")))
|
||||
if (!rc_yesno(getenv("EINFO_QUIET")))
|
||||
printf("%s\n", s->value);
|
||||
result = EXIT_SUCCESS;
|
||||
}
|
||||
|
@@ -295,7 +295,7 @@ int main(int argc, char **argv)
|
||||
/* set default path */
|
||||
setenv("PATH", path_default, 1);
|
||||
|
||||
if (! reexec)
|
||||
if (!reexec)
|
||||
init(default_runlevel);
|
||||
|
||||
if (mkfifo(RC_INIT_FIFO, 0600) == -1 && errno != EEXIST)
|
||||
|
@@ -94,7 +94,7 @@ write_log(int logfd, const char *buffer, size_t bytes)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (! in_term || isalpha((unsigned char)*p))
|
||||
if (!in_term || isalpha((unsigned char)*p))
|
||||
in_escape = in_term = false;
|
||||
cont:
|
||||
p++;
|
||||
|
@@ -138,7 +138,7 @@ env_config(void)
|
||||
/* Ensure our PATH is prefixed with the system locations first
|
||||
for a little extra security */
|
||||
path = getenv("PATH");
|
||||
if (! path)
|
||||
if (!path)
|
||||
setenv("PATH", RC_PATH_PREFIX, 1);
|
||||
else if (strncmp (RC_PATH_PREFIX, path, pplen) != 0) {
|
||||
l = strlen(path) + pplen + 3;
|
||||
@@ -152,7 +152,7 @@ env_config(void)
|
||||
while ((tok = strsep(&npp, ":")))
|
||||
if (strcmp(tok, token) == 0)
|
||||
break;
|
||||
if (! tok)
|
||||
if (!tok)
|
||||
p += snprintf(p, l - (p - e), ":%s", token);
|
||||
free (np);
|
||||
}
|
||||
@@ -203,7 +203,7 @@ env_config(void)
|
||||
setenv("EINFO_VERBOSE", "YES", 1);
|
||||
|
||||
errno = 0;
|
||||
if ((! rc_conf_yesno("rc_color") && errno == 0) ||
|
||||
if ((!rc_conf_yesno("rc_color") && errno == 0) ||
|
||||
rc_conf_yesno("rc_nocolor"))
|
||||
setenv("EINFO_COLOR", "NO", 1);
|
||||
}
|
||||
@@ -472,7 +472,7 @@ pid_t get_pid(const char *applet,const char *pidfile)
|
||||
FILE *fp;
|
||||
pid_t pid;
|
||||
|
||||
if (! pidfile)
|
||||
if (!pidfile)
|
||||
return -1;
|
||||
|
||||
if ((fp = fopen(pidfile, "r")) == NULL) {
|
||||
|
@@ -279,7 +279,7 @@ int do_stop(const char *applet, const char *exec, const char *const *argv,
|
||||
errno = 0;
|
||||
killed = (kill(pi->pid, sig) == 0 ||
|
||||
errno == ESRCH ? true : false);
|
||||
if (! quiet)
|
||||
if (!quiet)
|
||||
eendv(killed ? 0 : 1,
|
||||
"%s: failed to send signal %d to PID %d: %s",
|
||||
applet, sig, pi->pid, strerror(errno));
|
||||
@@ -422,7 +422,7 @@ int run_stop_schedule(const char *applet,
|
||||
|
||||
if (progressed)
|
||||
printf("\n");
|
||||
if (! quiet) {
|
||||
if (!quiet) {
|
||||
if (nrunning == 1)
|
||||
eerror("%s: %d process refused to stop", applet, nrunning);
|
||||
else
|
||||
|
@@ -154,15 +154,15 @@ int main(int argc, char **argv)
|
||||
eerrorx("%s: service `%s' does not exist", applet, *argv);
|
||||
}
|
||||
state = rc_service_state(*argv);
|
||||
if (if_crashed && ! (rc_service_daemons_crashed(*argv) && errno != EACCES))
|
||||
if (if_crashed && !(rc_service_daemons_crashed(*argv) && errno != EACCES))
|
||||
return 0;
|
||||
if (if_inactive && ! (state & RC_SERVICE_INACTIVE))
|
||||
if (if_inactive && !(state & RC_SERVICE_INACTIVE))
|
||||
return 0;
|
||||
if (if_notstarted && (state & RC_SERVICE_STARTED))
|
||||
return 0;
|
||||
if (if_started && ! (state & RC_SERVICE_STARTED))
|
||||
if (if_started && !(state & RC_SERVICE_STARTED))
|
||||
return 0;
|
||||
if (if_stopped && ! (state & RC_SERVICE_STOPPED))
|
||||
if (if_stopped && !(state & RC_SERVICE_STOPPED))
|
||||
return 0;
|
||||
*argv = service;
|
||||
execv(*argv, argv);
|
||||
|
@@ -412,7 +412,7 @@ int main(int argc, char **argv)
|
||||
state = rc_service_state(s->value);
|
||||
if ((rc_stringlist_find(sservices, s->value) ||
|
||||
(state & ( RC_SERVICE_STOPPED | RC_SERVICE_HOTPLUGGED)))) {
|
||||
if (! (state & RC_SERVICE_FAILED)) {
|
||||
if (!(state & RC_SERVICE_FAILED)) {
|
||||
TAILQ_REMOVE(services, s, entries);
|
||||
free(s->value);
|
||||
free(s);
|
||||
|
@@ -31,7 +31,7 @@ int main(int argc, char **argv)
|
||||
putchar(' ');
|
||||
while (*p) {
|
||||
c = (unsigned char)*p++;
|
||||
if (! isalnum(c))
|
||||
if (!isalnum(c))
|
||||
c = '_';
|
||||
putchar(c);
|
||||
}
|
||||
|
@@ -800,7 +800,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (makepidfile && pidfile) {
|
||||
fp = fopen(pidfile, "w");
|
||||
if (! fp)
|
||||
if (!fp)
|
||||
eerrorx("%s: fopen `%s': %s", applet, pidfile,
|
||||
strerror(errno));
|
||||
fprintf(fp, "%d\n", mypid);
|
||||
|
@@ -1037,7 +1037,7 @@ int main(int argc, char **argv)
|
||||
|
||||
/* Make sure we can write a pid file */
|
||||
fp = fopen(pidfile, "w");
|
||||
if (! fp)
|
||||
if (!fp)
|
||||
eerrorx("%s: fopen `%s': %s", applet, pidfile, strerror(errno));
|
||||
fclose(fp);
|
||||
|
||||
|
Reference in New Issue
Block a user