aboutsummaryrefslogtreecommitdiffhomepage
path: root/exec.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-03-25 23:31:03 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-03-25 23:31:03 -0700
commit31b7d076b7bff8d7bb81e6a1fff58755b7baa10b (patch)
tree98744caa4771d845dccf0ae547aeafd4a01190b8 /exec.cpp
parenta11687fc5c984a18d1d2071c1f88d0a12c5b2f5d (diff)
Remove some dead variables.
Fix screwy output for invalid tilde expansion in expand.cpp Some cleanup per clang static analyzer
Diffstat (limited to 'exec.cpp')
-rw-r--r--exec.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/exec.cpp b/exec.cpp
index df35566f..85c91f58 100644
--- a/exec.cpp
+++ b/exec.cpp
@@ -718,6 +718,7 @@ void exec( parser_t &parser, job_t *j )
for( p=j->first_process; p; p = p->next )
{
+ const bool p_wants_pipe = (p->next != NULL);
mypipe[1]=-1;
skip_fork=0;
@@ -748,7 +749,7 @@ void exec( parser_t &parser, job_t *j )
j->io = io_add( j->io, &pipe_read );
}
- if( p->next )
+ if( p_wants_pipe )
{
// debug( 1, L"%ls|%ls" , p->argv[0], p->next->argv[0]);
@@ -1315,7 +1316,7 @@ void exec( parser_t &parser, job_t *j )
Set up the pipe the next process uses to read from the
current process_t
*/
- if( p->next )
+ if( p_wants_pipe )
pipe_read.param1.pipe_fd[0] = mypipe[0];
/*