diff options
| author | Max Khon <fjoe@FreeBSD.org> | 2003-06-02 13:31:16 +0000 |
|---|---|---|
| committer | Max Khon <fjoe@FreeBSD.org> | 2003-06-02 13:31:16 +0000 |
| commit | 401da56c0ffd3d7f4bcfbee6574a3cfb6d921a0b (patch) | |
| tree | c886c209bf62c74907dc00c04ee58f049a37c28a /lib/libc/stdlib | |
| parent | c6c1f70ac1159d873b810cd186c5fb8f05046641 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdlib')
| -rw-r--r-- | lib/libc/stdlib/realpath.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/realpath.c b/lib/libc/stdlib/realpath.c index 9dbb9b9269dd..8313a2749791 100644 --- a/lib/libc/stdlib/realpath.c +++ b/lib/libc/stdlib/realpath.c @@ -117,7 +117,7 @@ realpath(const char *path, char resolved[PATH_MAX]) */ if (resolved_len > 1) { resolved[resolved_len - 1] = '\0'; - q = strrchr(resolved, '/'); + q = strrchr(resolved, '/') + 1; *q = '\0'; resolved_len = q - resolved; } @@ -156,7 +156,7 @@ realpath(const char *path, char resolved[PATH_MAX]) } else if (resolved_len > 1) { /* Strip the last path component. */ resolved[resolved_len - 1] = '\0'; - q = strrchr(resolved, '/'); + q = strrchr(resolved, '/') + 1; *q = '\0'; resolved_len = q - resolved; } |
