diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-13 02:10:16 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-13 02:10:16 +0000 |
commit | ce8217e0ee91404d9ead31e9161c90ae176fd05b (patch) | |
tree | e5322fe6913a4f7c470b4e95b15eb433747939c7 /util.c | |
parent | 584e6f13d926fe0b642c15b1e9b474964755c62f (diff) | |
download | perl-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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)", |