summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-03-12 11:40:48 -0500
committerNick Mathewson <nickm@torproject.org>2021-03-12 11:40:48 -0500
commit444233c15ec34b78bba0b03547f0ae70b8e2b918 (patch)
tree934196084833755c33879b4c04faf1eaa6b1bc1d /src/lib
parentb5d08ddc09ec785d81e4043d9f9e2f032c9e49ab (diff)
downloadtor-444233c15ec34b78bba0b03547f0ae70b8e2b918.tar.gz
tor-444233c15ec34b78bba0b03547f0ae70b8e2b918.zip
Run "make autostyle" in advance of new series.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/crypt_ops/crypto_openssl_mgt.c2
-rw-r--r--src/lib/fs/path.c4
-rw-r--r--src/lib/log/util_bug.h2
-rw-r--r--src/lib/metrics/metrics_store_entry.h2
-rw-r--r--src/lib/sandbox/sandbox.c6
-rw-r--r--src/lib/tls/tortls_st.h2
-rw-r--r--src/lib/trace/debug.h2
-rw-r--r--src/lib/trace/trace.h2
8 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/crypt_ops/crypto_openssl_mgt.c b/src/lib/crypt_ops/crypto_openssl_mgt.c
index c3e01e9bba..6c01cb6aa8 100644
--- a/src/lib/crypt_ops/crypto_openssl_mgt.c
+++ b/src/lib/crypt_ops/crypto_openssl_mgt.c
@@ -106,7 +106,7 @@ crypto_openssl_get_version_str(void)
#else
/* This old name was changed around OpenSSL 1.1.0 */
const int query = SSLEAY_VERSION;
-#endif
+#endif /* defined(OPENSSL_VERSION) */
if (crypto_openssl_version_str == NULL) {
const char *raw_version = OpenSSL_version(query);
diff --git a/src/lib/fs/path.c b/src/lib/fs/path.c
index ced794ba8b..8c4b08f50a 100644
--- a/src/lib/fs/path.c
+++ b/src/lib/fs/path.c
@@ -571,7 +571,7 @@ wrap_closedir(void *arg)
{
closedir(arg);
}
-#endif /* defined(HAVE_GLOB) */
+#endif /* defined(_WIN32) || ... */
/** Return a new list containing the paths that match the pattern
* <b>pattern</b>. Return NULL on error. On POSIX systems, errno is set by the
@@ -636,7 +636,7 @@ tor_glob(const char *pattern)
#else
(void)pattern;
return result;
-#endif /* !defined(HAVE_GLOB) */
+#endif /* defined(_WIN32) || ... */
return result;
}
diff --git a/src/lib/log/util_bug.h b/src/lib/log/util_bug.h
index 6b3e19b977..dd82981e08 100644
--- a/src/lib/log/util_bug.h
+++ b/src/lib/log/util_bug.h
@@ -258,7 +258,7 @@
abort()
#else
#define FALLTHROUGH_UNLESS_ALL_BUGS_ARE_FATAL FALLTHROUGH
-#endif
+#endif /* defined(ALL_BUGS_ARE_FATAL) */
/** In older code, we used tor_fragile_assert() to mark optional failure
* points. At these points, we could make some debug builds fail.
diff --git a/src/lib/metrics/metrics_store_entry.h b/src/lib/metrics/metrics_store_entry.h
index 196ee5c99f..e4dc7a8b9a 100644
--- a/src/lib/metrics/metrics_store_entry.h
+++ b/src/lib/metrics/metrics_store_entry.h
@@ -40,7 +40,7 @@ struct metrics_store_entry_t {
} u;
};
-#endif /* METRICS_STORE_ENTRY_PRIVATE */
+#endif /* defined(METRICS_STORE_ENTRY_PRIVATE) */
typedef struct metrics_store_entry_t metrics_store_entry_t;
diff --git a/src/lib/sandbox/sandbox.c b/src/lib/sandbox/sandbox.c
index 816f76959e..6ee90b8ff2 100644
--- a/src/lib/sandbox/sandbox.c
+++ b/src/lib/sandbox/sandbox.c
@@ -734,7 +734,7 @@ sb_socket(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
SCMP_CMP(2, SCMP_CMP_EQ, IPPROTO_IP));
if (rc)
return rc;
-#endif
+#endif /* defined(ENABLE_NSS) */
rc = seccomp_rule_add_3(ctx, SCMP_ACT_ALLOW, SCMP_SYS(socket),
SCMP_CMP(0, SCMP_CMP_EQ, PF_UNIX),
@@ -1691,7 +1691,7 @@ get_syscall_from_ucontext(const ucontext_t *ctx)
{
return (int) ctx->uc_mcontext.M_SYSCALL;
}
-#else
+#else /* !defined(SYSCALL_NAME_DEBUGGING) */
static const char *
get_syscall_name(int syscall_num)
{
@@ -1704,7 +1704,7 @@ get_syscall_from_ucontext(const ucontext_t *ctx)
(void) ctx;
return -1;
}
-#endif
+#endif /* defined(SYSCALL_NAME_DEBUGGING) */
#ifdef USE_BACKTRACE
#define MAX_DEPTH 256
diff --git a/src/lib/tls/tortls_st.h b/src/lib/tls/tortls_st.h
index 0998887903..b27e73b15f 100644
--- a/src/lib/tls/tortls_st.h
+++ b/src/lib/tls/tortls_st.h
@@ -80,7 +80,7 @@ struct tor_tls_t {
uint64_t last_write_count;
uint64_t last_read_count;
long last_error;
-#endif
+#endif /* defined(ENABLE_NSS) */
};
#endif /* !defined(TOR_TORTLS_ST_H) */
diff --git a/src/lib/trace/debug.h b/src/lib/trace/debug.h
index 218625dac8..f9d536b301 100644
--- a/src/lib/trace/debug.h
+++ b/src/lib/trace/debug.h
@@ -28,7 +28,7 @@
log_debug(LD_GENERAL, "Tracepoint \"" XSTR(event_name) "\" from " \
"subsystem \"" XSTR(subsystem) "\" hit.")
-#else /* defined(USE_TRACING_INSTRUMENTATION_LOG_DEBUG) */
+#else /* !defined(USE_TRACING_INSTRUMENTATION_LOG_DEBUG) */
/* NOP the debug event. */
#define TOR_TRACE_LOG_DEBUG(subsystem, name, ...)
diff --git a/src/lib/trace/trace.h b/src/lib/trace/trace.h
index d4cd5b68f9..b94600a383 100644
--- a/src/lib/trace/trace.h
+++ b/src/lib/trace/trace.h
@@ -26,7 +26,7 @@ tracing_log_warning(void)
"purpose, your tor is NOT safe to run.");
}
-#else
+#else /* !defined(HAVE_TRACING) */
/* NOP it. */
#define tracing_log_warning()