summaryrefslogtreecommitdiff
path: root/src/lib/process
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-09-30 08:57:37 -0400
committerNick Mathewson <nickm@torproject.org>2019-09-30 08:57:37 -0400
commit53116ca0b71898b46a6d678407fb1b03c2ab8a93 (patch)
tree40a4595d6ae0a9e49348c90b378924aff293b2d2 /src/lib/process
parentde66bed604377db23cfa303b83e385ef59121a64 (diff)
downloadtor-53116ca0b71898b46a6d678407fb1b03c2ab8a93.tar.gz
tor-53116ca0b71898b46a6d678407fb1b03c2ab8a93.zip
Re-run "make autostyle" with improved annotate_ifdef_directives
Diffstat (limited to 'src/lib/process')
-rw-r--r--src/lib/process/env.c2
-rw-r--r--src/lib/process/process_unix.c2
-rw-r--r--src/lib/process/restrict.c2
-rw-r--r--src/lib/process/setuid.c8
-rw-r--r--src/lib/process/winprocess_sys.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/process/env.c b/src/lib/process/env.c
index 0060200ba1..3912ade197 100644
--- a/src/lib/process/env.c
+++ b/src/lib/process/env.c
@@ -47,7 +47,7 @@ get_environment(void)
* when we do a mostly-static build on OSX 10.7, the resulting binary won't
* work on OSX 10.6. */
return *_NSGetEnviron();
-#else /* !(defined(HAVE__NSGETENVIRON)) */
+#else /* !defined(HAVE__NSGETENVIRON) */
return environ;
#endif /* defined(HAVE__NSGETENVIRON) */
}
diff --git a/src/lib/process/process_unix.c b/src/lib/process/process_unix.c
index 17ade87463..332b432c54 100644
--- a/src/lib/process/process_unix.c
+++ b/src/lib/process/process_unix.c
@@ -199,7 +199,7 @@ process_unix_exec(process_t *process)
"Cannot find maximum file descriptor, assuming: %d", max_fd);
}
}
-#else /* !(defined(_SC_OPEN_MAX)) */
+#else /* !defined(_SC_OPEN_MAX) */
max_fd = DEFAULT_MAX_FD;
#endif /* defined(_SC_OPEN_MAX) */
diff --git a/src/lib/process/restrict.c b/src/lib/process/restrict.c
index 93d06de9a2..fda284f3d9 100644
--- a/src/lib/process/restrict.c
+++ b/src/lib/process/restrict.c
@@ -152,7 +152,7 @@ tor_mlockall(void)
"pages: %s", strerror(errno));
return -1;
}
-#else /* !(defined(HAVE_UNIX_MLOCKALL)) */
+#else /* !defined(HAVE_UNIX_MLOCKALL) */
log_warn(LD_GENERAL, "Unable to lock memory pages. mlockall() unsupported?");
return -1;
#endif /* defined(HAVE_UNIX_MLOCKALL) */
diff --git a/src/lib/process/setuid.c b/src/lib/process/setuid.c
index e132787943..3c94ce4bac 100644
--- a/src/lib/process/setuid.c
+++ b/src/lib/process/setuid.c
@@ -72,7 +72,7 @@ log_credential_status(void)
"UID is %u (real), %u (effective), %u (saved)",
(unsigned)ruid, (unsigned)euid, (unsigned)suid);
}
-#else /* !(defined(HAVE_GETRESUID)) */
+#else /* !defined(HAVE_GETRESUID) */
/* getresuid is not present on MacOS X, so we can't get the saved (E)UID */
ruid = getuid();
euid = geteuid();
@@ -93,7 +93,7 @@ log_credential_status(void)
"GID is %u (real), %u (effective), %u (saved)",
(unsigned)rgid, (unsigned)egid, (unsigned)sgid);
}
-#else /* !(defined(HAVE_GETRESGID)) */
+#else /* !defined(HAVE_GETRESGID) */
/* getresgid is not present on MacOS X, so we can't get the saved (E)GID */
rgid = getgid();
egid = getegid();
@@ -154,7 +154,7 @@ have_capability_support(void)
return 0;
cap_free(caps);
return 1;
-#else /* !(defined(HAVE_LINUX_CAPABILITIES)) */
+#else /* !defined(HAVE_LINUX_CAPABILITIES) */
return 0;
#endif /* defined(HAVE_LINUX_CAPABILITIES) */
}
@@ -265,7 +265,7 @@ switch_id(const char *user, const unsigned flags)
if (drop_capabilities(1))
return -1;
}
-#else /* !(defined(HAVE_LINUX_CAPABILITIES)) */
+#else /* !defined(HAVE_LINUX_CAPABILITIES) */
(void) keep_bindlow;
if (warn_if_no_caps) {
log_warn(LD_CONFIG, "KeepBindCapabilities set, but no capability support "
diff --git a/src/lib/process/winprocess_sys.c b/src/lib/process/winprocess_sys.c
index ff9bc1ba04..ad65886422 100644
--- a/src/lib/process/winprocess_sys.c
+++ b/src/lib/process/winprocess_sys.c
@@ -51,7 +51,7 @@ subsys_winprocess_initialize(void)
return 0;
}
-#else /* !(defined(_WIN32)) */
+#else /* !defined(_WIN32) */
#define WINPROCESS_SYS_ENABLED false
#define subsys_winprocess_initialize NULL
#endif /* defined(_WIN32) */