diff options
author | Vincent Pit <perl@profvince.com> | 2008-04-29 21:33:21 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-04-30 08:17:51 +0000 |
commit | a79b25b7e1c39b559797e18bb4d3e057a9f962f0 (patch) | |
tree | 94828323b69ff7f85ff2ae6309a005549a5247c2 /doio.c | |
parent | 9c2a5cfebcaca6cb620772a695fd0f59629bfdf5 (diff) | |
download | perl-a79b25b7e1c39b559797e18bb4d3e057a9f962f0.tar.gz |
Double magic/warnings with binmode $fh, undef
From: "Vincent Pit" <perl@profvince.com>
Message-ID: <63615.92.128.97.94.1209490401.squirrel@92.128.97.94>
p4raw-id: //depot/perl@33766
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1096,12 +1096,10 @@ Perl_do_sysseek(pTHX_ GV *gv, Off_t pos, int whence) } int -Perl_mode_from_discipline(pTHX_ SV *discp) +Perl_mode_from_discipline(pTHX_ const char *s, STRLEN len) { int mode = O_BINARY; - if (discp) { - STRLEN len; - const char *s = SvPV_const(discp,len); + if (s) { while (*s) { if (*s == ':') { switch (s[1]) { |