summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2001-06-12 17:21:39 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-13 02:50:43 +0000
commita5ff3b9ad25c72d5b32019260730131002679dcd (patch)
treeaa42ea08749ef809415314f31a54359413cc4f30 /util.c
parent61d42ce43847d6cea183d4f40e2921e53606f13f (diff)
downloadperl-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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/util.c b/util.c
index 91bbc0b523..945172e1da 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)",