diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1999-02-12 19:45:53 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1999-02-12 19:45:53 +0000 |
commit | be92e0e6cd8c5809d9a1cd1c2425ece7df92f82b (patch) | |
tree | c8fbf02a045a31e02585cc4ffd62b40ca8838c10 /lib/libc | |
parent | a728078455535e45ece36d145c36402eae00f69f (diff) |
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdlib/realpath.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/stdlib/realpath.c b/lib/libc/stdlib/realpath.c index b5177e9c221c..80ed43f427ca 100644 --- a/lib/libc/stdlib/realpath.c +++ b/lib/libc/stdlib/realpath.c @@ -62,7 +62,7 @@ realpath(path, resolved) struct stat sb; int fd, n, rootd, serrno; char *p, *q, wbuf[MAXPATHLEN]; - int symlinks = 0; + int symlinks = 0; /* Save the starting point. */ if ((fd = open(".", O_RDONLY)) < 0) { @@ -101,10 +101,10 @@ loop: /* Deal with the last component. */ if (*p != '\0' && lstat(p, &sb) == 0) { if (S_ISLNK(sb.st_mode)) { - if (++symlinks > MAXSYMLINKS) { - errno = ELOOP; - goto err1; - } + if (++symlinks > MAXSYMLINKS) { + errno = ELOOP; + goto err1; + } n = readlink(p, resolved, MAXPATHLEN - 1); if (n < 0) goto err1; |