diff options
author | Craig A. Berry <craigberry@mac.com> | 2001-06-12 17:21:39 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-13 02:50:43 +0000 |
commit | a5ff3b9ad25c72d5b32019260730131002679dcd (patch) | |
tree | aa42ea08749ef809415314f31a54359413cc4f30 /util.c | |
parent | 61d42ce43847d6cea183d4f40e2921e53606f13f (diff) | |
download | perl-a5ff3b9ad25c72d5b32019260730131002679dcd.tar.gz |
Re: hacking util.c, attrs.xs, and re.xs to compile on VMS
Message-Id: <a05101000b74c8698483b@[172.16.52.1]>
p4raw-id: //depot/perl@10555
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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)", |