summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2015-06-24 20:54:07 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2015-06-26 23:09:46 -0400
commit27e6dabe2abcb106f9dd28e976fdb26ca016ed53 (patch)
tree3b4578accb7c75e0c077c5c901e12d8391e96d9d
parent38bb0011ea854565b1e4b9ff988bb7a3913ff52d (diff)
downloadperl-27e6dabe2abcb106f9dd28e976fdb26ca016ed53.tar.gz
self cannot be NULL here because PerlIO_push() will deref it.
Coverity CID 104779. Follow-up on Coverity CID 28973, and the respective commit 316ebaf2.
-rw-r--r--perlio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/perlio.c b/perlio.c
index 92fa2bea84..b5d5959a32 100644
--- a/perlio.c
+++ b/perlio.c
@@ -2211,10 +2211,10 @@ PerlIOBase_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags)
char buf[8];
assert(self);
PerlIO_debug("PerlIOBase_dup %s f=%p o=%p param=%p\n",
- self ? self->name : "(Null)",
+ self->name,
(void*)f, (void*)o, (void*)param);
- if (self && self->Getarg)
- arg = (*self->Getarg)(aTHX_ o, param, flags);
+ if (self->Getarg)
+ arg = (*self->Getarg)(aTHX_ o, param, flags);
f = PerlIO_push(aTHX_ f, self, PerlIO_modestr(o,buf), arg);
if (f && PerlIOBase(o)->flags & PERLIO_F_UTF8)
PerlIOBase(f)->flags |= PERLIO_F_UTF8;