develooper Front page | perl.perl5.porters | Postings from April 2006

[PATCH] perlio.c: (Coverity) eliminate temp ptr that confuses Coverity into thinking there is a resource leak

Thread Next
From:
jhi
Date:
April 14, 2006 01:58
Subject:
[PATCH] perlio.c: (Coverity) eliminate temp ptr that confuses Coverity into thinking there is a resource leak
Message ID:
20060414085644.94A076D08C@ugli.hut.fi
--- perlio.c.dist	2006-04-14 11:54:54.000000000 +0300
+++ perlio.c	2006-04-14 11:55:46.000000000 +0300
@@ -2912,9 +2912,8 @@
 		    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;
 	    }

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About