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
@@ -129,7 +129,7 @@ rc_find_pids(const char *exec, const char *const *argv, uid_t uid, pid_t pid)
|
||||
if (exists("/proc/self/status")) {
|
||||
fp = fopen("/proc/self/status", "r");
|
||||
if (fp) {
|
||||
while (! feof(fp)) {
|
||||
while (!feof(fp)) {
|
||||
rc_getline(&line, &len, fp);
|
||||
if (strncmp(line, "envID:\t0", 8) == 0) {
|
||||
openvz_host = true;
|
||||
@@ -183,12 +183,12 @@ rc_find_pids(const char *exec, const char *const *argv, uid_t uid, pid_t pid)
|
||||
if (exists(buffer)) {
|
||||
fp = fopen(buffer, "r");
|
||||
free(buffer);
|
||||
if (! fp)
|
||||
if (!fp)
|
||||
continue;
|
||||
while (! feof(fp)) {
|
||||
while (!feof(fp)) {
|
||||
rc_getline(&line, &len, fp);
|
||||
if (strncmp(line, "envID:", 6) == 0) {
|
||||
container_pid = ! (strncmp(line, "envID:\t0", 8) == 0);
|
||||
container_pid = !(strncmp(line, "envID:\t0", 8) == 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ get_shell_value(char *string)
|
||||
char *p = string;
|
||||
char *e;
|
||||
|
||||
if (! string)
|
||||
if (!string)
|
||||
return NULL;
|
||||
|
||||
if (*p == '\'')
|
||||
@@ -142,7 +142,7 @@ rc_deptree_load_file(const char *deptree_file)
|
||||
if (strcmp(type, "service") == 0) {
|
||||
/* Sanity */
|
||||
e = get_shell_value(p);
|
||||
if (! e || *e == '\0')
|
||||
if (!e || *e == '\0')
|
||||
continue;
|
||||
depinfo = xmalloc(sizeof(*depinfo));
|
||||
TAILQ_INIT(&depinfo->depends);
|
||||
@@ -493,7 +493,7 @@ rc_deptree_order(const RC_DEPTREE *deptree, const char *runlevel, int options)
|
||||
RC_STRINGLIST *services;
|
||||
|
||||
bootlevel = getenv("RC_BOOTLEVEL");
|
||||
if (! bootlevel)
|
||||
if (!bootlevel)
|
||||
bootlevel = RC_LEVEL_BOOT;
|
||||
|
||||
/* When shutting down, list all running services */
|
||||
|
||||
@@ -210,11 +210,11 @@ static void rc_config_set_value(RC_STRINGLIST *config, char *value)
|
||||
bool replaced;
|
||||
char *token;
|
||||
|
||||
if (! p)
|
||||
if (!p)
|
||||
return;
|
||||
if (strncmp(p, "export ", 7) == 0)
|
||||
p += 7;
|
||||
if (! (token = strsep(&p, "=")))
|
||||
if (!(token = strsep(&p, "=")))
|
||||
return;
|
||||
|
||||
entry = xstrdup(token);
|
||||
@@ -338,7 +338,7 @@ static RC_STRINGLIST * rc_config_directory(RC_STRINGLIST *config)
|
||||
if (rc_conf_d_files) {
|
||||
rc_stringlist_sort(&rc_conf_d_files);
|
||||
TAILQ_FOREACH(fname, rc_conf_d_files, entries) {
|
||||
if (! fname->value)
|
||||
if (!fname->value)
|
||||
continue;
|
||||
sprintf(path, "%s/%s", RC_CONF_D, fname->value);
|
||||
rc_conf_d_list = rc_config_list(path);
|
||||
@@ -405,7 +405,7 @@ rc_conf_value(const char *setting)
|
||||
RC_STRING *s;
|
||||
char *p;
|
||||
|
||||
if (! rc_conf) {
|
||||
if (!rc_conf) {
|
||||
rc_conf = rc_config_load(RC_CONF);
|
||||
atexit(_free_rc_conf);
|
||||
|
||||
|
||||
@@ -538,10 +538,10 @@ rc_service_resolve(const char *service)
|
||||
|
||||
/* First check started services */
|
||||
snprintf(file, sizeof(file), RC_SVCDIR "/%s/%s", "started", service);
|
||||
if (lstat(file, &buf) || ! S_ISLNK(buf.st_mode)) {
|
||||
if (lstat(file, &buf) || !S_ISLNK(buf.st_mode)) {
|
||||
snprintf(file, sizeof(file), RC_SVCDIR "/%s/%s",
|
||||
"inactive", service);
|
||||
if (lstat(file, &buf) || ! S_ISLNK(buf.st_mode))
|
||||
if (lstat(file, &buf) || !S_ISLNK(buf.st_mode))
|
||||
*file = '\0';
|
||||
}
|
||||
|
||||
@@ -742,7 +742,7 @@ rc_service_mark(const char *service, const RC_SERVICE state)
|
||||
s != RC_SERVICE_STOPPED &&
|
||||
s != RC_SERVICE_HOTPLUGGED &&
|
||||
s != RC_SERVICE_SCHEDULED) &&
|
||||
(! skip_wasinactive || s != RC_SERVICE_WASINACTIVE))
|
||||
(!skip_wasinactive || s != RC_SERVICE_WASINACTIVE))
|
||||
{
|
||||
snprintf(file, sizeof(file), RC_SVCDIR "/%s/%s",
|
||||
rc_service_state_names[i].name, base);
|
||||
@@ -901,7 +901,7 @@ rc_service_schedule_start(const char *service, const char *service_to_start)
|
||||
bool retval;
|
||||
|
||||
/* service may be a provided service, like net */
|
||||
if (! service || ! rc_service_exists(service_to_start))
|
||||
if (!service || !rc_service_exists(service_to_start))
|
||||
return false;
|
||||
|
||||
p += snprintf(file, sizeof(file), RC_SVCDIR "/scheduled/%s",
|
||||
@@ -1000,7 +1000,7 @@ rc_services_in_state(RC_SERVICE state)
|
||||
|
||||
dirs = ls_dir(dir, 0);
|
||||
list = rc_stringlist_new();
|
||||
if (! dirs)
|
||||
if (!dirs)
|
||||
return list;
|
||||
|
||||
TAILQ_FOREACH(d, dirs, entries) {
|
||||
|
||||
Reference in New Issue
Block a user