Astyle cleanup.

This commit is contained in:
Kimmo Varis 2010-07-30 22:16:12 +03:00
parent 66098b1c33
commit d860c7b4a1
1 changed files with 7 additions and 7 deletions

View File

@ -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;