aboutsummaryrefslogtreecommitdiff
path: root/src/lib/process
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-06-05 09:33:35 -0400
committerNick Mathewson <nickm@torproject.org>2019-06-05 09:33:35 -0400
commit60213a3621c5fa354fd7b3f3feb1a2a336d5c9ce (patch)
tree18ac4ae7f6e06b1b52d66175dc449ad08d5c68aa /src/lib/process
parentd1b02456c107256ee562b36b0ef2f5544eb27cee (diff)
downloadtor-60213a3621c5fa354fd7b3f3feb1a2a336d5c9ce.tar.gz
tor-60213a3621c5fa354fd7b3f3feb1a2a336d5c9ce.zip
Run "make autostyle."
Diffstat (limited to 'src/lib/process')
-rw-r--r--src/lib/process/daemon.h2
-rw-r--r--src/lib/process/env.h2
-rw-r--r--src/lib/process/pidfile.h2
-rw-r--r--src/lib/process/process.c10
-rw-r--r--src/lib/process/process.h6
-rw-r--r--src/lib/process/process_unix.c2
-rw-r--r--src/lib/process/process_unix.h6
-rw-r--r--src/lib/process/process_win32.c4
-rw-r--r--src/lib/process/process_win32.h6
-rw-r--r--src/lib/process/setuid.h2
-rw-r--r--src/lib/process/winprocess_sys.c2
11 files changed, 22 insertions, 22 deletions
diff --git a/src/lib/process/daemon.h b/src/lib/process/daemon.h
index 20920e0aae..423c498837 100644
--- a/src/lib/process/daemon.h
+++ b/src/lib/process/daemon.h
@@ -18,4 +18,4 @@ int finish_daemon(const char *desired_cwd);
bool start_daemon_has_been_called(void);
-#endif
+#endif /* !defined(TOR_DAEMON_H) */
diff --git a/src/lib/process/env.h b/src/lib/process/env.h
index 15d59351e0..19c2235970 100644
--- a/src/lib/process/env.h
+++ b/src/lib/process/env.h
@@ -38,4 +38,4 @@ void set_environment_variable_in_smartlist(struct smartlist_t *env_vars,
const char *new_var,
void (*free_old)(void*),
int free_p);
-#endif
+#endif /* !defined(TOR_ENV_H) */
diff --git a/src/lib/process/pidfile.h b/src/lib/process/pidfile.h
index dfeb39e046..af59041f80 100644
--- a/src/lib/process/pidfile.h
+++ b/src/lib/process/pidfile.h
@@ -13,4 +13,4 @@
int write_pidfile(const char *filename);
-#endif
+#endif /* !defined(TOR_PIDFILE_H) */
diff --git a/src/lib/process/process.c b/src/lib/process/process.c
index 422942dc83..631c7169f1 100644
--- a/src/lib/process/process.c
+++ b/src/lib/process/process.c
@@ -83,7 +83,7 @@ struct process_t {
#else
/** Our Win32 process handle. */
process_win32_t *win32_process;
-#endif
+#endif /* !defined(_WIN32) */
};
/** Convert a given process status in <b>status</b> to its string
@@ -205,7 +205,7 @@ process_new(const char *command)
#else
/* Prepare our Win32 process handle. */
process->win32_process = process_win32_new();
-#endif
+#endif /* !defined(_WIN32) */
smartlist_add(processes, process);
@@ -240,7 +240,7 @@ process_free_(process_t *process)
#else
/* Cleanup our Win32 process handle. */
process_win32_free(process->win32_process);
-#endif
+#endif /* !defined(_WIN32) */
smartlist_remove(processes, process);
@@ -513,7 +513,7 @@ process_get_unix_process(const process_t *process)
tor_assert(process->unix_process);
return process->unix_process;
}
-#else
+#else /* !(!defined(_WIN32)) */
/** Get the internal handle for Windows backend. */
process_win32_t *
process_get_win32_process(const process_t *process)
@@ -522,7 +522,7 @@ process_get_win32_process(const process_t *process)
tor_assert(process->win32_process);
return process->win32_process;
}
-#endif
+#endif /* !defined(_WIN32) */
/** Write <b>size</b> bytes of <b>data</b> to the given process's standard
* input. */
diff --git a/src/lib/process/process.h b/src/lib/process/process.h
index 14069923a0..05c091a5bf 100644
--- a/src/lib/process/process.h
+++ b/src/lib/process/process.h
@@ -111,7 +111,7 @@ struct process_unix_t *process_get_unix_process(const process_t *process);
#else
struct process_win32_t;
struct process_win32_t *process_get_win32_process(const process_t *process);
-#endif
+#endif /* !defined(_WIN32) */
void process_write(process_t *process,
const uint8_t *data, size_t size);
@@ -140,6 +140,6 @@ STATIC void process_read_buffer(process_t *process,
STATIC void process_read_lines(process_t *process,
buf_t *buffer,
process_read_callback_t callback);
-#endif /* defined(PROCESS_PRIVATE). */
+#endif /* defined(PROCESS_PRIVATE) */
-#endif /* defined(TOR_PROCESS_H). */
+#endif /* !defined(TOR_PROCESS_H) */
diff --git a/src/lib/process/process_unix.c b/src/lib/process/process_unix.c
index 790ab897e9..17ade87463 100644
--- a/src/lib/process/process_unix.c
+++ b/src/lib/process/process_unix.c
@@ -702,4 +702,4 @@ process_unix_close_file_descriptors(process_unix_t *unix_process)
return success;
}
-#endif /* defined(_WIN32). */
+#endif /* !defined(_WIN32) */
diff --git a/src/lib/process/process_unix.h b/src/lib/process/process_unix.h
index a1d8f72993..da40b3e567 100644
--- a/src/lib/process/process_unix.h
+++ b/src/lib/process/process_unix.h
@@ -61,8 +61,8 @@ STATIC int process_unix_read_handle(process_t *,
process_unix_handle_t *,
buf_t *);
STATIC bool process_unix_close_file_descriptors(process_unix_t *);
-#endif /* defined(PROCESS_UNIX_PRIVATE). */
+#endif /* defined(PROCESS_UNIX_PRIVATE) */
-#endif /* defined(_WIN32). */
+#endif /* !defined(_WIN32) */
-#endif /* defined(TOR_PROCESS_UNIX_H). */
+#endif /* !defined(TOR_PROCESS_UNIX_H) */
diff --git a/src/lib/process/process_win32.c b/src/lib/process/process_win32.c
index ddbe76bfd9..624333d4a3 100644
--- a/src/lib/process/process_win32.c
+++ b/src/lib/process/process_win32.c
@@ -741,7 +741,7 @@ process_win32_cleanup_handle(process_win32_handle_t *handle)
format_win32_error(error_code));
}
}
-#endif
+#endif /* 0 */
/* Close our handle. */
if (handle->pipe != INVALID_HANDLE_VALUE) {
@@ -1084,4 +1084,4 @@ tor_join_win_cmdline(const char *argv[])
return joined_argv;
}
-#endif /* ! defined(_WIN32). */
+#endif /* defined(_WIN32) */
diff --git a/src/lib/process/process_win32.h b/src/lib/process/process_win32.h
index d79dde157e..a50d86df5b 100644
--- a/src/lib/process/process_win32.h
+++ b/src/lib/process/process_win32.h
@@ -90,8 +90,8 @@ STATIC bool process_win32_handle_read_completion(process_win32_handle_t *,
STATIC char *format_win_cmdline_argument(const char *arg);
STATIC char *tor_join_win_cmdline(const char *argv[]);
-#endif /* defined(PROCESS_WIN32_PRIVATE). */
+#endif /* defined(PROCESS_WIN32_PRIVATE) */
-#endif /* ! defined(_WIN32). */
+#endif /* defined(_WIN32) */
-#endif /* defined(TOR_PROCESS_WIN32_H). */
+#endif /* !defined(TOR_PROCESS_WIN32_H) */
diff --git a/src/lib/process/setuid.h b/src/lib/process/setuid.h
index 7d03e1f025..a2125d2d06 100644
--- a/src/lib/process/setuid.h
+++ b/src/lib/process/setuid.h
@@ -19,4 +19,4 @@ int have_capability_support(void);
#define SWITCH_ID_WARN_IF_NO_CAPS (1<<1)
int switch_id(const char *user, unsigned flags);
-#endif
+#endif /* !defined(TOR_SETUID_H) */
diff --git a/src/lib/process/winprocess_sys.c b/src/lib/process/winprocess_sys.c
index 1266babca8..48c0888658 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) */