Update brace style.
Add braces around single-line blocks, and remove line breaks before function-opening braces. This resolves #537.
This commit is contained in:
@@ -9,8 +9,7 @@ static const bool config_stats =
|
||||
;
|
||||
|
||||
void *
|
||||
thd_start(void *arg)
|
||||
{
|
||||
thd_start(void *arg) {
|
||||
int err;
|
||||
void *p;
|
||||
uint64_t a0, a1, d0, d1;
|
||||
@@ -19,15 +18,17 @@ thd_start(void *arg)
|
||||
|
||||
sz = sizeof(a0);
|
||||
if ((err = mallctl("thread.allocated", (void *)&a0, &sz, NULL, 0))) {
|
||||
if (err == ENOENT)
|
||||
if (err == ENOENT) {
|
||||
goto label_ENOENT;
|
||||
}
|
||||
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)
|
||||
if (err == ENOENT) {
|
||||
goto label_ENOENT;
|
||||
}
|
||||
test_fail("%s(): Error in mallctl(): %s", __func__,
|
||||
strerror(err));
|
||||
}
|
||||
@@ -37,16 +38,18 @@ thd_start(void *arg)
|
||||
|
||||
sz = sizeof(d0);
|
||||
if ((err = mallctl("thread.deallocated", (void *)&d0, &sz, NULL, 0))) {
|
||||
if (err == ENOENT)
|
||||
if (err == ENOENT) {
|
||||
goto label_ENOENT;
|
||||
}
|
||||
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 == ENOENT)
|
||||
if (err == ENOENT) {
|
||||
goto label_ENOENT;
|
||||
}
|
||||
test_fail("%s(): Error in mallctl(): %s", __func__,
|
||||
strerror(err));
|
||||
}
|
||||
@@ -96,14 +99,12 @@ label_ENOENT:
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_main_thread)
|
||||
{
|
||||
TEST_BEGIN(test_main_thread) {
|
||||
thd_start(NULL);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_subthread)
|
||||
{
|
||||
TEST_BEGIN(test_subthread) {
|
||||
thd_t thd;
|
||||
|
||||
thd_create(&thd, thd_start, NULL);
|
||||
@@ -112,8 +113,7 @@ TEST_BEGIN(test_subthread)
|
||||
TEST_END
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
main(void) {
|
||||
/* Run tests multiple times to check for bad interactions. */
|
||||
return (test(
|
||||
test_main_thread,
|
||||
|
Reference in New Issue
Block a user