diff options
author | Jason Evans <jasone@canonware.com> | 2017-01-16 00:56:30 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2017-01-21 05:43:07 (GMT) |
commit | c4c2592c834d8a37beb0a0d53842095160cbf9ee (patch) | |
tree | e4717ea6a2f13926dadd74ea1fc83f9742f77968 /test/src/thd.c | |
parent | 5154ff32ee8c37bacb6afd8a07b923eb33228357 (diff) | |
download | jemalloc-c4c2592c834d8a37beb0a0d53842095160cbf9ee.zip jemalloc-c4c2592c834d8a37beb0a0d53842095160cbf9ee.tar.gz jemalloc-c4c2592c834d8a37beb0a0d53842095160cbf9ee.tar.bz2 |
Update brace style.
Add braces around single-line blocks, and remove line breaks before
function-opening braces.
This resolves #537.
Diffstat (limited to 'test/src/thd.c')
-rw-r--r-- | test/src/thd.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/test/src/thd.c b/test/src/thd.c index e316708..9a15eab 100644 --- a/test/src/thd.c +++ b/test/src/thd.c @@ -2,17 +2,16 @@ #ifdef _WIN32 void -thd_create(thd_t *thd, void *(*proc)(void *), void *arg) -{ +thd_create(thd_t *thd, void *(*proc)(void *), void *arg) { LPTHREAD_START_ROUTINE routine = (LPTHREAD_START_ROUTINE)proc; *thd = CreateThread(NULL, 0, routine, arg, 0, NULL); - if (*thd == NULL) + if (*thd == NULL) { test_fail("Error in CreateThread()\n"); + } } void -thd_join(thd_t thd, void **ret) -{ +thd_join(thd_t thd, void **ret) { if (WaitForSingleObject(thd, INFINITE) == WAIT_OBJECT_0 && ret) { DWORD exit_code; GetExitCodeThread(thd, (LPDWORD) &exit_code); @@ -22,15 +21,14 @@ thd_join(thd_t thd, void **ret) #else void -thd_create(thd_t *thd, void *(*proc)(void *), void *arg) -{ - if (pthread_create(thd, NULL, proc, arg) != 0) +thd_create(thd_t *thd, void *(*proc)(void *), void *arg) { + if (pthread_create(thd, NULL, proc, arg) != 0) { test_fail("Error in pthread_create()\n"); + } } void -thd_join(thd_t thd, void **ret) -{ +thd_join(thd_t thd, void **ret) { pthread_join(thd, ret); } #endif |