diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-04-25 21:52:54 -0400 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2014-05-29 16:02:26 +1000 |
commit | de092133b63ee6f61ed274e5c366adf60622300e (patch) | |
tree | 0e783a8158b9cb0bdca68f7a8d47f006eca89577 /perlio.c | |
parent | b35b96b6f8e35207d18b15dfcdbd0d08a7c6437c (diff) | |
download | perl-de092133b63ee6f61ed274e5c366adf60622300e.tar.gz |
Pointers set but then (immediately or very shortly) overwritten.
Fix for Coverity perl5 CIDs 29203, 29207, 29211, 29214, 29217, 29218,
29222: Unused pointer value (UNUSED_VALUE) Pointer foo returned by
bar() is overwritten.
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2948,7 +2948,7 @@ PerlIO_importFILE(FILE *stdio, const char *mode) } fclose(f2); } - if ((f = PerlIO_push(aTHX_(f = PerlIO_allocate(aTHX)), PERLIO_FUNCS_CAST(&PerlIO_stdio), mode, NULL))) { + if ((f = PerlIO_push(aTHX_(PerlIO_allocate(aTHX)), PERLIO_FUNCS_CAST(&PerlIO_stdio), mode, NULL))) { s = PerlIOSelf(f, PerlIOStdio); s->stdio = stdio; PerlIOUnix_refcnt_inc(fileno(stdio)); @@ -2971,8 +2971,8 @@ PerlIOStdio_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers, if (!IS_SAFE_PATHNAME(path, len, "open")) return NULL; PerlIOUnix_refcnt_dec(fileno(s->stdio)); - stdio = PerlSIO_freopen(path, (mode = PerlIOStdio_mode(mode, tmode)), - s->stdio); + stdio = PerlSIO_freopen(path, PerlIOStdio_mode(mode, tmode), + s->stdio); if (!s->stdio) return NULL; s->stdio = stdio; |