summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-04-12 02:39:32 +0300
committerNicholas Clark <nick@ccl4.org>2006-04-11 21:03:48 +0000
commit0f0f9e2bc563abd8d7ce0492ab8d3d803fb9e687 (patch)
treeee7bb0614cbbea70f903b20a7cb14b8599aac860 /perlio.c
parent56279a21118d1d29a1b0c13e8567361057bbd7f9 (diff)
downloadperl-0f0f9e2bc563abd8d7ce0492ab8d3d803fb9e687.tar.gz
perlio.c: false Coverity finding (it cannot see that two pointers are the same): but help Coverity by removing the temp ptr
Message-Id: <200604112039.k3BKdWix334525@kosh.hut.fi> Date: Tue, 11 Apr 2006 23:39:32 +0300 (EEST) p4raw-id: //depot/perl@27770
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/perlio.c b/perlio.c
index c5da06ad4d..07c47ce290 100644
--- a/perlio.c
+++ b/perlio.c
@@ -2864,7 +2864,6 @@ PerlIOStdio_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers,
#endif
stdio = PerlSIO_fopen(path, mode);
if (stdio) {
- PerlIOStdio *s;
if (!f) {
f = PerlIO_allocate(aTHX);
}
@@ -2872,9 +2871,10 @@ PerlIOStdio_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers,
mode = PerlIOStdio_mode(mode, tmode);
f = PerlIO_push(aTHX_ f, self, mode, PerlIOArg);
if (f) {
- s = PerlIOSelf(f, PerlIOStdio);
- s->stdio = stdio;
- PerlIOUnix_refcnt_inc(fileno(s->stdio));
+ PerlIOSelf(f, PerlIOStdio)->stdio = stdio;
+ PerlIOUnix_refcnt_inc(fileno(stdio));
+ } else {
+ PerlSIO_fclose(stdio);
}
return f;
}