summaryrefslogtreecommitdiffabout
path: root/capture.c
Side-by-side diff
Diffstat (limited to 'capture.c') (more/less context) (ignore whitespace changes)
-rw-r--r--capture.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/capture.c b/capture.c
index f22fc9f..7b2bf9a 100644
--- a/capture.c
+++ b/capture.c
@@ -168,13 +168,12 @@ capture_DESTROY(struct capture *cp)
if (cp->program != &PL_sv_undef)
SvREFCNT_dec(cp->program);
- if (cp->input != &PL_sv_undef) {
+ if (cp->input != &PL_sv_undef)
SvREFCNT_dec(cp->input);
- /* Make sure runcap_free won't free the input sc_base pointer
- */
- cp->rc.rc_cap[RUNCAP_STDIN].sc_base = NULL;
- cp->rc.rc_cap[RUNCAP_STDIN].sc_fd = -1;
- }
+ /* Make sure runcap_free won't free the input sc_base pointer
+ */
+ cp->rc.rc_cap[RUNCAP_STDIN].sc_base = NULL;
+ cp->rc.rc_cap[RUNCAP_STDIN].sc_fd = -1;
free(cp->closure[0].str);
if (cp->closure[0].cv != &PL_sv_undef)
@@ -278,6 +277,6 @@ capture_run(struct capture *cp)
cp->closure[1].len = 0;
}
- return res;
+ return res == 0;
}

Return to:

Send suggestions and report system problems to the System administrator.