Merge branch '46-add-curly-braces' into 'master'
Add curly braces using uncrustify and then reformat with clang-format back Closes #46 See merge request isc-projects/bind9!3057 (cherry picked from commit67b68e06ad)36c6105eUse coccinelle to add braces to nested single line statementd14bb713Add copy of run-clang-tidy that can fixup the filepaths056e133cUse clang-tidy to add curly braces around one-line statements
This commit is contained in:
@@ -28,8 +28,9 @@ my_callback(isc_task_t *task, isc_event_t *event)
|
||||
char *name = event->ev_arg;
|
||||
|
||||
j = 0;
|
||||
for (i = 0; i < 1000000; i++)
|
||||
for (i = 0; i < 1000000; i++) {
|
||||
j += 100;
|
||||
}
|
||||
printf("task %s (%p): %d\n", name, task, j);
|
||||
isc_event_free(&event);
|
||||
}
|
||||
@@ -73,12 +74,15 @@ main(int argc, char *argv[])
|
||||
|
||||
if (argc > 1) {
|
||||
workers = atoi(argv[1]);
|
||||
if (workers < 1)
|
||||
if (workers < 1) {
|
||||
workers = 1;
|
||||
if (workers > 8192)
|
||||
}
|
||||
if (workers > 8192) {
|
||||
workers = 8192;
|
||||
} else
|
||||
}
|
||||
} else {
|
||||
workers = 2;
|
||||
}
|
||||
printf("%u workers\n", workers);
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
@@ -119,9 +123,9 @@ main(int argc, char *argv[])
|
||||
printf("task 2 = %p\n", t2);
|
||||
#ifndef WIN32
|
||||
sleep(2);
|
||||
#else
|
||||
#else /* ifndef WIN32 */
|
||||
Sleep(2000);
|
||||
#endif
|
||||
#endif /* ifndef WIN32 */
|
||||
|
||||
/*
|
||||
* Note: (void *)1 is used as a sender here, since some compilers
|
||||
@@ -186,9 +190,9 @@ main(int argc, char *argv[])
|
||||
|
||||
#ifndef WIN32
|
||||
sleep(10);
|
||||
#else
|
||||
#else /* ifndef WIN32 */
|
||||
Sleep(10000);
|
||||
#endif
|
||||
#endif /* ifndef WIN32 */
|
||||
printf("destroy\n");
|
||||
isc_timer_detach(&ti1);
|
||||
isc_timer_detach(&ti2);
|
||||
|
||||
Reference in New Issue
Block a user