summaryrefslogtreecommitdiff
path: root/dmake
diff options
context:
space:
mode:
authorPierre-André Jacquod <pjacquod@alumni.ethz.ch>2011-10-03 12:55:00 +0200
committerPierre-André Jacquod <pjacquod@alumni.ethz.ch>2011-10-07 15:57:52 +0200
commit7bd7d37f58ee7dbc893201d57940cf851fa9dce1 (patch)
tree439424942048152b4d0c5f13db7bc51a2b8aeb8f /dmake
parent347367d14ac8e3d7c25aaf50cc72593212d27f26 (diff)
cppcheck reduce scope in dmake/unix/runargv.c
Diffstat (limited to 'dmake')
-rw-r--r--dmake/unix/runargv.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/dmake/unix/runargv.c b/dmake/unix/runargv.c
index 2ea22cb63da0..4e87862125ae 100644
--- a/dmake/unix/runargv.c
+++ b/dmake/unix/runargv.c
@@ -840,23 +840,25 @@ int pqid;
PUBLIC void
Clean_up_processes()
{
- register int i;
- int ret;
+ int ret;
- if( _procs != NIL(PR) ) {
+ if( _procs != NIL(PR) )
+ {
+ register int i;
for( i=0; i<Max_proc; i++ )
- if( _procs[i].pr_valid ) {
-#if !defined(USE_CREATEPROCESS)
- if( (ret = kill(_procs[i].pr_pid, SIGTERM)) ) {
- fprintf(stderr, "Killing of pid %d from pq[%d] failed with: %s - %d ret: %d\n",
- _procs[i].pr_pid, i,
- strerror(errno), SIGTERM, ret );
+ if( _procs[i].pr_valid )
+ {
+ #if !defined(USE_CREATEPROCESS)
+ if( (ret = kill(_procs[i].pr_pid, SIGTERM)) )
+ {
+ fprintf(stderr, "Killing of pid %d from pq[%d] failed with: %s - %d ret: %d\n",
+ _procs[i].pr_pid, i, strerror(errno), SIGTERM, ret );
+ }
+ #else
+ TerminateProcess(_procs[i].pr_pid, 1);
+ #endif
}
-#else
- TerminateProcess(_procs[i].pr_pid, 1);
-#endif
- }
- }
+ }
}