mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 21:23:06 +00:00
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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user