diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2002-04-21 22:32:29 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2002-04-21 22:32:29 +0000 |
commit | 91f3b821ca3eaa8b7d74bb338729ba51b7b68a90 (patch) | |
tree | 07c31a8443cfe72d822b821516a5f4ef90099af5 /ext/Cwd/Cwd.xs | |
parent | 11ef8fddd64f78304dc923b07dffddd7a4f28074 (diff) | |
download | perl-91f3b821ca3eaa8b7d74bb338729ba51b7b68a90.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/Cwd.xs')
-rw-r--r-- | ext/Cwd/Cwd.xs | 7 |
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 /* |