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 0a6215c171
commit f1bba4a87c
346 changed files with 18286 additions and 17770 deletions

View file

@ -2,27 +2,27 @@
void *
thd_start(void *arg) {
int err;
void *p;
uint64_t a0, a1, d0, d1;
int err;
void *p;
uint64_t a0, a1, d0, d1;
uint64_t *ap0, *ap1, *dp0, *dp1;
size_t sz, usize;
size_t sz, usize;
sz = sizeof(a0);
if ((err = mallctl("thread.allocated", (void *)&a0, &sz, NULL, 0))) {
if (err == ENOENT) {
goto label_ENOENT;
}
test_fail("%s(): Error in mallctl(): %s", __func__,
strerror(err));
test_fail(
"%s(): Error in mallctl(): %s", __func__, strerror(err));
}
sz = sizeof(ap0);
if ((err = mallctl("thread.allocatedp", (void *)&ap0, &sz, NULL, 0))) {
if (err == ENOENT) {
goto label_ENOENT;
}
test_fail("%s(): Error in mallctl(): %s", __func__,
strerror(err));
test_fail(
"%s(): Error in mallctl(): %s", __func__, strerror(err));
}
expect_u64_eq(*ap0, a0,
"\"thread.allocatedp\" should provide a pointer to internal "
@ -33,17 +33,17 @@ thd_start(void *arg) {
if (err == ENOENT) {
goto label_ENOENT;
}
test_fail("%s(): Error in mallctl(): %s", __func__,
strerror(err));
test_fail(
"%s(): Error in mallctl(): %s", __func__, strerror(err));
}
sz = sizeof(dp0);
if ((err = mallctl("thread.deallocatedp", (void *)&dp0, &sz, NULL,
0))) {
if ((err = mallctl(
"thread.deallocatedp", (void *)&dp0, &sz, NULL, 0))) {
if (err == ENOENT) {
goto label_ENOENT;
}
test_fail("%s(): Error in mallctl(): %s", __func__,
strerror(err));
test_fail(
"%s(): Error in mallctl(): %s", __func__, strerror(err));
}
expect_u64_eq(*dp0, d0,
"\"thread.deallocatedp\" should provide a pointer to internal "
@ -107,10 +107,6 @@ TEST_END
int
main(void) {
/* Run tests multiple times to check for bad interactions. */
return test(
test_main_thread,
test_subthread,
test_main_thread,
test_subthread,
test_main_thread);
return test(test_main_thread, test_subthread, test_main_thread,
test_subthread, test_main_thread);
}