From a5ff3b9ad25c72d5b32019260730131002679dcd Mon Sep 17 00:00:00 2001 From: "Craig A. Berry" Date: Tue, 12 Jun 2001 17:21:39 -0500 Subject: [PATCH] Re: hacking util.c, attrs.xs, and re.xs to compile on VMS Message-Id: p4raw-id: //depot/perl@10555 --- configure.com | 2 +- util.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/configure.com b/configure.com index 4a5ee1e..7b02485 100644 --- a/configure.com +++ b/configure.com @@ -3654,7 +3654,7 @@ $ WS "#include " $ WS "int main()" $ WS "{" $ WS "char * place;" -$ WS "place = memchr(""foo"", 47, 3)" +$ WS "place = memchr(""foo"", 47, 3);" $ WS "exit(0);" $ WS "}" $ CS diff --git a/util.c b/util.c index 91bbc0b..945172e 100644 --- a/util.c +++ b/util.c @@ -4940,10 +4940,9 @@ Perl_sv_realpath(pTHX_ SV *sv, char *path, STRLEN len) #ifndef PERL_MICRO char name[MAXPATHLEN] = { 0 }, *s; STRLEN pathlen, namelen; - const char zero = '\0'; /* Don't use strlen() to avoid running off the end. */ - s = memchr(path, zero, MAXPATHLEN); + s = memchr(path, '\0', MAXPATHLEN); pathlen = s ? s - path : MAXPATHLEN; #ifdef HAS_REALPATH @@ -4967,7 +4966,7 @@ Perl_sv_realpath(pTHX_ SV *sv, char *path, STRLEN len) /* Is the destination buffer too long? * Don't use strlen() to avoid running off the end. */ - s = memchr(name, zero, MAXPATHLEN); + s = memchr(name, '\0', MAXPATHLEN); namelen = s ? s - name : MAXPATHLEN; if (namelen == MAXPATHLEN) { Perl_warn(aTHX_ "sv_realpath: realpath(\"%s\"): %c= (MAXPATHLEN = %d)", -- 2.7.4