summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Newton <pne@cpan.org>2001-05-31 09:41:36 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-31 11:38:27 +0000
commit665f6e7c45da401c6cccf75c489ced98352d133c (patch)
treed96e8460521af0c3db65bd0913bf59f5552ca932
parentff8b883f08ede2692ddfcf3d6ec866785674fbf7 (diff)
downloadperl-665f6e7c45da401c6cccf75c489ced98352d133c.tar.gz
Re: [PATCH util.c] More warning cleanups.
Message-Id: <200105310538.IAA25458@taku.hut.fi> Undo C++-ism that snekt in. p4raw-id: //depot/perl@10349
-rw-r--r--util.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/util.c b/util.c
index de0c052f74..9a3ff31a06 100644
--- a/util.c
+++ b/util.c
@@ -2369,9 +2369,13 @@ Perl_my_popen_list(pTHX_ char *mode, int n, SV **args)
# ifndef NOFILE
# define NOFILE 20
# endif
- for (int fd = PL_maxsysfd + 1; fd < NOFILE; fd++) {
- if (fd != pp[1])
- PerlLIO_close(fd);
+ {
+ int fd;
+
+ for (fd = PL_maxsysfd + 1; fd < NOFILE; fd++) {
+ if (fd != pp[1])
+ PerlLIO_close(fd);
+ }
}
#endif
do_aexec5(Nullsv, args-1, args-1+n, pp[1], did_pipes);
@@ -2500,11 +2504,16 @@ Perl_my_popen(pTHX_ char *cmd, char *mode)
#ifndef NOFILE
#define NOFILE 20
#endif
- for (fd = PL_maxsysfd + 1; fd < NOFILE; fd++)
- if (fd != pp[1])
- PerlLIO_close(fd);
+ {
+ int fd;
+
+ for (fd = PL_maxsysfd + 1; fd < NOFILE; fd++)
+ if (fd != pp[1])
+ PerlLIO_close(fd);
+ }
#endif
- do_exec3(cmd,pp[1],did_pipes); /* may or may not use the shell */
+ /* may or may not use the shell */
+ do_exec3(cmd, pp[1], did_pipes);
PerlProc__exit(1);
}
#endif /* defined OS2 */