From: Jarkko Hietaniemi Date: Fri, 14 Apr 2006 11:56:44 +0000 (+0300) Subject: perlio.c: (Coverity) eliminate temp ptr that confuses Coverity into thinking there... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1a159fba18a77552673669d932364b0c4ea1852e;p=p5sagit%2Fp5-mst-13.2.git perlio.c: (Coverity) eliminate temp ptr that confuses Coverity into thinking there is a resource leak Message-Id: <20060414085644.94A076D08C@ugli.hut.fi> Date: Fri, 14 Apr 2006 11:56:44 +0300 (EEST) p4raw-id: //depot/perl@27798 --- diff --git a/perlio.c b/perlio.c index 07c47ce..8a93acb 100644 --- a/perlio.c +++ b/perlio.c @@ -2912,9 +2912,8 @@ PerlIOStdio_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers, f = PerlIO_allocate(aTHX); } if ((f = PerlIO_push(aTHX_ f, self, mode, PerlIOArg))) { - PerlIOStdio * const s = PerlIOSelf(f, PerlIOStdio); - s->stdio = stdio; - PerlIOUnix_refcnt_inc(fileno(s->stdio)); + PerlIOSelf(f, PerlIOStdio)->stdio = stdio; + PerlIOUnix_refcnt_inc(fileno(stdio)); } return f; }