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:
@@ -21,14 +21,14 @@
|
||||
|
||||
#ifdef WIN32
|
||||
#define sleep(x) Sleep(1000 * x)
|
||||
#endif
|
||||
#endif /* ifdef WIN32 */
|
||||
|
||||
isc_rwlock_t lock;
|
||||
|
||||
static isc_threadresult_t
|
||||
#ifdef WIN32
|
||||
WINAPI
|
||||
#endif
|
||||
#endif /* ifdef WIN32 */
|
||||
run1(void *arg)
|
||||
{
|
||||
char *message = arg;
|
||||
@@ -60,7 +60,7 @@ static isc_threadresult_t
|
||||
static isc_threadresult_t
|
||||
#ifdef WIN32
|
||||
WINAPI
|
||||
#endif
|
||||
#endif /* ifdef WIN32 */
|
||||
run2(void *arg)
|
||||
{
|
||||
char *message = arg;
|
||||
@@ -98,12 +98,14 @@ main(int argc, char *argv[])
|
||||
char name[100];
|
||||
void * dupname;
|
||||
|
||||
if (argc > 1)
|
||||
if (argc > 1) {
|
||||
nworkers = atoi(argv[1]);
|
||||
else
|
||||
} else {
|
||||
nworkers = 2;
|
||||
if (nworkers > 100)
|
||||
}
|
||||
if (nworkers > 100) {
|
||||
nworkers = 100;
|
||||
}
|
||||
printf("%u workers\n", nworkers);
|
||||
|
||||
RUNTIME_CHECK(isc_rwlock_init(&lock, 5, 10) == ISC_R_SUCCESS);
|
||||
|
||||
Reference in New Issue
Block a user