Bugzilla Bug 289052: added braces around nested if statements to ensure

the intended nesting (as indicated by the indentation of the code).  The
patch is contributed by Shanmu <shanmus@gmail.com>. r=wtc.
Modified files: server_test.c servr_kk.c servr_ku.c servr_uk.c servr_uu.c
This commit is contained in:
wtchang%redhat.com 2005-06-29 18:02:44 +00:00
Родитель 748dac40db
Коммит 761cde6f1b
5 изменённых файлов: 25 добавлений и 20 удалений

Просмотреть файл

@ -230,9 +230,9 @@ WorkerThreadFunc(void *_listenSock)
PR_UNJOINABLE_THREAD,
THREAD_STACKSIZE);
if (!WorkerThread)
if (!WorkerThread) {
if (debug_mode) printf("Error creating client thread %d\n", workerThreads);
else {
} else {
PR_AtomicIncrement(&workerThreads);
if (debug_mode) DPRINTF("\tServer creates worker (%d)\n", workerThreads);
}
@ -259,11 +259,12 @@ WorkerThreadFunc(void *_listenSock)
bytesToWrite,
0,
PR_INTERVAL_NO_TIMEOUT);
if (bytesWritten != _server_data)
if (bytesWritten != _server_data) {
if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
bytesWritten, PR_GetOSError());
else
} else {
if (debug_mode) DPRINTF("\tServer sent %d bytes\n", bytesWritten);
}
PR_Close(newSock);
PR_AtomicDecrement(&workerThreadsBusy);

Просмотреть файл

@ -196,9 +196,9 @@ WorkerThreadFunc(void *_listenSock)
PR_UNJOINABLE_THREAD,
THREAD_STACKSIZE);
if (!WorkerThread)
if (!WorkerThread) {
if (debug_mode) printf("Error creating client thread %d\n", workerThreads);
else {
} else {
PR_AtomicIncrement(&workerThreads);
if (debug_mode) DPRINTF("\tServer creates worker (%d)\n", workerThreads);
}
@ -225,11 +225,12 @@ WorkerThreadFunc(void *_listenSock)
bytesToWrite,
0,
PR_INTERVAL_NO_TIMEOUT);
if (bytesWritten != _server_data)
if (bytesWritten != _server_data) {
if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
bytesWritten, PR_GetOSError());
else
} else {
if (debug_mode) DPRINTF("\tServer sent %d bytes\n", bytesWritten);
}
PR_Close(newSock);
PR_AtomicDecrement(&workerThreadsBusy);

Просмотреть файл

@ -197,9 +197,9 @@ WorkerThreadFunc(void *_listenSock)
PR_UNJOINABLE_THREAD,
THREAD_STACKSIZE);
if (!WorkerThread)
if (!WorkerThread) {
if (debug_mode) printf("Error creating client thread %d\n", workerThreads);
else {
} else {
PR_AtomicIncrement(&workerThreads);
if (debug_mode) DPRINTF("\tServer creates worker (%d)\n", workerThreads);
}
@ -226,11 +226,12 @@ WorkerThreadFunc(void *_listenSock)
bytesToWrite,
0,
PR_INTERVAL_NO_TIMEOUT);
if (bytesWritten != _server_data)
if (bytesWritten != _server_data) {
if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
bytesWritten, PR_GetOSError());
else
} else {
if (debug_mode) DPRINTF("\tServer sent %d bytes\n", bytesWritten);
}
PR_Close(newSock);
PR_AtomicDecrement(&workerThreadsBusy);

Просмотреть файл

@ -199,9 +199,9 @@ WorkerThreadFunc(void *_listenSock)
PR_UNJOINABLE_THREAD,
THREAD_STACKSIZE);
if (!WorkerThread)
if (!WorkerThread) {
if (debug_mode) printf("Error creating client thread %d\n", workerThreads);
else {
} else {
PR_AtomicIncrement(&workerThreads);
if (debug_mode) DPRINTF("\tServer creates worker (%d)\n", workerThreads);
}
@ -228,11 +228,12 @@ WorkerThreadFunc(void *_listenSock)
bytesToWrite,
0,
PR_INTERVAL_NO_TIMEOUT);
if (bytesWritten != _server_data)
if (bytesWritten != _server_data) {
if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
bytesWritten, PR_GetOSError());
else
} else {
if (debug_mode) DPRINTF("\tServer sent %d bytes\n", bytesWritten);
}
PR_Close(newSock);
PR_AtomicDecrement(&workerThreadsBusy);

Просмотреть файл

@ -197,9 +197,9 @@ WorkerThreadFunc(void *_listenSock)
PR_UNJOINABLE_THREAD,
THREAD_STACKSIZE);
if (!WorkerThread)
if (!WorkerThread) {
if (debug_mode) printf("Error creating client thread %d\n", workerThreads);
else {
} else {
PR_AtomicIncrement(&workerThreads);
if (debug_mode) DPRINTF("\tServer creates worker (%d)\n", workerThreads);
}
@ -226,11 +226,12 @@ WorkerThreadFunc(void *_listenSock)
bytesToWrite,
0,
PR_INTERVAL_NO_TIMEOUT);
if (bytesWritten != _server_data)
if (bytesWritten != _server_data) {
if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
bytesWritten, PR_GetOSError());
else
} else {
if (debug_mode) DPRINTF("\tServer sent %d bytes\n", bytesWritten);
}
PR_Close(newSock);
PR_AtomicDecrement(&workerThreadsBusy);