diff options
author | phk <phk@FreeBSD.org> | 1997-09-15 08:25:14 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-09-15 08:25:14 +0000 |
commit | 6df69d408651b922a4da25ee1c130216e152cd70 (patch) | |
tree | c04c44acfede09b5885916be89b97091ba7a3847 /lib/libc/gen/getcwd.c | |
parent | a44ef5197596cfa2deb4b537cda0041e1ce02bd7 (diff) | |
download | FreeBSD-src-6df69d408651b922a4da25ee1c130216e152cd70.zip FreeBSD-src-6df69d408651b922a4da25ee1c130216e152cd70.tar.gz |
Fix a buglet and a couple of stylistic nits from Bruce.
Diffstat (limited to 'lib/libc/gen/getcwd.c')
-rw-r--r-- | lib/libc/gen/getcwd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libc/gen/getcwd.c b/lib/libc/gen/getcwd.c index eb48b5a..9f27e90 100644 --- a/lib/libc/gen/getcwd.c +++ b/lib/libc/gen/getcwd.c @@ -66,7 +66,7 @@ getcwd(pt, size) ino_t root_ino; size_t ptsize, upsize; int save_errno; - char *ept, *eup, *up; + char *ept, *eup, *up, c; /* * If no buffer specified by the user, allocate one as necessary. @@ -89,8 +89,7 @@ getcwd(pt, size) return (NULL); ept = pt + ptsize; } - if (!__getcwd(pt,ptsize)) { - char c; + if (!__getcwd(pt, ept-pt)) { bpt = pt; ept = pt + strlen(pt) - 1; while (bpt < ept) { |