Reformat the codebase with the clang-format 18.

This commit is contained in:
guangli-dai
2025-06-13 12:31:12 -07:00
committed by Guangli Dai
parent ae4e729d15
commit 34f359e0ca
346 changed files with 18286 additions and 17770 deletions
+7 -7
View File
@@ -3,7 +3,7 @@
#include "jemalloc/internal/log.h"
char log_var_names[JEMALLOC_LOG_VAR_BUFSIZE];
char log_var_names[JEMALLOC_LOG_VAR_BUFSIZE];
atomic_b_t log_init_done = ATOMIC_INIT(false);
/*
@@ -11,7 +11,7 @@ atomic_b_t log_init_done = ATOMIC_INIT(false);
* with a pointer to the first character after the end of the string.
*/
static const char *
log_var_extract_segment(const char* segment_begin) {
log_var_extract_segment(const char *segment_begin) {
const char *end;
for (end = segment_begin; *end != '\0' && *end != '|'; end++) {
}
@@ -30,12 +30,12 @@ log_var_matches_segment(const char *segment_begin, const char *segment_end,
if (segment_len == 1 && *segment_begin == '.') {
return true;
}
if (segment_len == log_var_len) {
if (segment_len == log_var_len) {
return strncmp(segment_begin, log_var_begin, segment_len) == 0;
} else if (segment_len < log_var_len) {
return strncmp(segment_begin, log_var_begin, segment_len) == 0
&& log_var_begin[segment_len] == '.';
} else {
} else {
return false;
}
}
@@ -61,9 +61,9 @@ log_var_update_state(log_var_t *log_var) {
segment_begin);
assert(segment_end < log_var_names + JEMALLOC_LOG_VAR_BUFSIZE);
if (log_var_matches_segment(segment_begin, segment_end,
log_var_begin, log_var_end)) {
atomic_store_u(&log_var->state, LOG_ENABLED,
ATOMIC_RELAXED);
log_var_begin, log_var_end)) {
atomic_store_u(
&log_var->state, LOG_ENABLED, ATOMIC_RELAXED);
return LOG_ENABLED;
}
if (*segment_end == '\0') {