summaryrefslogtreecommitdiff
path: root/ext/Cwd
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2002-04-21 22:32:29 +0000
committerGurusamy Sarathy <gsar@cpan.org>2002-04-21 22:32:29 +0000
commiteee4a17bb1327e9965d1aeff114c5965364f9830 (patch)
tree07c31a8443cfe72d822b821516a5f4ef90099af5 /ext/Cwd
parente4297a9803068e475e62a242773388815305cfa4 (diff)
downloadperl-eee4a17bb1327e9965d1aeff114c5965364f9830.tar.gz
squelch some more type mismatch warnings
SvREFCNT_dec(x ? y : z) did not typecast the right thing due to missing parens in macro definition p4raw-id: //depot/perl@16055
Diffstat (limited to 'ext/Cwd')
-rw-r--r--ext/Cwd/Cwd.xs7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/Cwd/Cwd.xs b/ext/Cwd/Cwd.xs
index 667a1e2167..f53f6ee19e 100644
--- a/ext/Cwd/Cwd.xs
+++ b/ext/Cwd/Cwd.xs
@@ -73,8 +73,7 @@ bsd_realpath(path, resolved)
dTHX;
return Perl_rmsexpand(aTHX_ (char*)path, resolved, NULL, 0);
#else
- struct stat sb;
- int n, rootd, serrno;
+ int rootd, serrno;
char *p, *q, wbuf[MAXPATHLEN];
int symlinks = 0;
@@ -124,9 +123,12 @@ loop:
p = resolved;
#if defined(HAS_LSTAT) && defined(HAS_READLINK) && defined(HAS_SYMLINK)
+ {
+ struct stat sb;
/* Deal with the last component. */
if (lstat(p, &sb) == 0) {
if (S_ISLNK(sb.st_mode)) {
+ int n;
if (++symlinks > MAXSYMLINKS) {
errno = ELOOP;
goto err1;
@@ -143,6 +145,7 @@ loop:
p = "";
}
}
+ }
#endif
/*