From a79b25b7e1c39b559797e18bb4d3e057a9f962f0 Mon Sep 17 00:00:00 2001 From: Vincent Pit Date: Tue, 29 Apr 2008 21:33:21 +0200 Subject: Double magic/warnings with binmode $fh, undef From: "Vincent Pit" Message-ID: <63615.92.128.97.94.1209490401.squirrel@92.128.97.94> p4raw-id: //depot/perl@33766 --- doio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'doio.c') diff --git a/doio.c b/doio.c index 6b0c9f2840..b73f127a1e 100644 --- a/doio.c +++ b/doio.c @@ -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]) { -- cgit v1.2.1