From d860c7b4a1a963ee7dbdf0645ac268eeaaaf7f2c Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Fri, 30 Jul 2010 22:16:12 +0300 Subject: [PATCH] Astyle cleanup. --- cli/threadexecutor.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cli/threadexecutor.cpp b/cli/threadexecutor.cpp index 635faf03f..bd8c66cfd 100644 --- a/cli/threadexecutor.cpp +++ b/cli/threadexecutor.cpp @@ -57,7 +57,7 @@ int ThreadExecutor::handleRead(unsigned int &result) char type = 0; if (read(_pipe[0], &type, 1) <= 0) { - if( errno == EAGAIN ) + if ( errno == EAGAIN ) return 0; return -1; @@ -141,10 +141,10 @@ unsigned int ThreadExecutor::check() unsigned int childCount = 0; unsigned int i = 0; - while( true ) + while ( true ) { // Start a new child - if( i < _filenames.size() && childCount < _settings._jobs ) + if ( i < _filenames.size() && childCount < _settings._jobs ) { pid_t pid = fork(); if (pid < 0) @@ -182,12 +182,12 @@ unsigned int ThreadExecutor::check() else if (childCount > 0) { // Wait for child to quit before stating new processes - while(true) + while (true) { int readRes = handleRead(result); - if( readRes == -1 ) + if ( readRes == -1 ) break; - else if( readRes == 0 ) + else if ( readRes == 0 ) usleep(5000); // 5 ms } @@ -195,7 +195,7 @@ unsigned int ThreadExecutor::check() waitpid(0, &stat, 0); --childCount; } - else if(childCount == 0) + else if (childCount == 0) { // All done break;