From: Philip Newton Date: Thu, 31 May 2001 07:41:36 +0000 (+0200) Subject: Re: [PATCH util.c] More warning cleanups. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=665f6e7c45da401c6cccf75c489ced98352d133c;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/util.c b/util.c index de0c052..9a3ff31 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 */