summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-06-13 02:10:16 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-13 02:10:16 +0000
commitce8217e0ee91404d9ead31e9161c90ae176fd05b (patch)
treee5322fe6913a4f7c470b4e95b15eb433747939c7 /util.c
parent584e6f13d926fe0b642c15b1e9b474964755c62f (diff)
downloadperl-ce8217e0ee91404d9ead31e9161c90ae176fd05b.tar.gz
VMS DEC C compiler found nits by Peter Prymmer.
p4raw-id: //depot/perl@10553
Diffstat (limited to 'util.c')
-rw-r--r--util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/util.c b/util.c
index 945172e1da..91bbc0b523 100644
--- a/util.c
+++ b/util.c
@@ -4940,9 +4940,10 @@ 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, '\0', MAXPATHLEN);
+ s = memchr(path, zero, MAXPATHLEN);
pathlen = s ? s - path : MAXPATHLEN;
#ifdef HAS_REALPATH
@@ -4966,7 +4967,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, '\0', MAXPATHLEN);
+ s = memchr(name, zero, MAXPATHLEN);
namelen = s ? s - name : MAXPATHLEN;
if (namelen == MAXPATHLEN) {
Perl_warn(aTHX_ "sv_realpath: realpath(\"%s\"): %c= (MAXPATHLEN = %d)",