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:
Jason Evans
2017-01-15 16:56:30 -08:00
parent 5154ff32ee
commit c4c2592c83
119 changed files with 2971 additions and 3572 deletions

View File

@@ -11,8 +11,7 @@ const char *malloc_conf =
#endif
static int
prof_dump_open_intercept(bool propagate_err, const char *filename)
{
prof_dump_open_intercept(bool propagate_err, const char *filename) {
int fd;
fd = open("/dev/null", O_WRONLY);
@@ -22,14 +21,12 @@ prof_dump_open_intercept(bool propagate_err, const char *filename)
}
static void *
alloc_from_permuted_backtrace(unsigned thd_ind, unsigned iteration)
{
alloc_from_permuted_backtrace(unsigned thd_ind, unsigned iteration) {
return (btalloc(1, thd_ind*NALLOCS_PER_THREAD + iteration));
}
static void *
thd_start(void *varg)
{
thd_start(void *varg) {
unsigned thd_ind = *(unsigned *)varg;
size_t bt_count_prev, bt_count;
unsigned i_prev, i;
@@ -57,8 +54,7 @@ thd_start(void *varg)
return (NULL);
}
TEST_BEGIN(test_idump)
{
TEST_BEGIN(test_idump) {
bool active;
thd_t thds[NTHREADS];
unsigned thd_args[NTHREADS];
@@ -77,14 +73,14 @@ TEST_BEGIN(test_idump)
thd_args[i] = i;
thd_create(&thds[i], thd_start, (void *)&thd_args[i]);
}
for (i = 0; i < NTHREADS; i++)
for (i = 0; i < NTHREADS; i++) {
thd_join(thds[i], NULL);
}
}
TEST_END
int
main(void)
{
main(void) {
return (test(
test_idump));
}