1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

Fix yet a minor stylistic nit from Bruce (Doesn't he have more

important things to do ?? :-)

Prepare for the likely case of a change in kernel algorithm.
This commit is contained in:
Poul-Henning Kamp 1997-09-15 17:40:15 +00:00
parent 11210c4ed5
commit 36dff60096
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=29476

View File

@ -89,13 +89,15 @@ getcwd(pt, size)
return (NULL);
ept = pt + ptsize;
}
if (!__getcwd(pt, ept-pt)) {
bpt = pt;
ept = pt + strlen(pt) - 1;
while (bpt < ept) {
c = *bpt;
*bpt++ = *ept;
*ept-- = c;
if (!__getcwd(pt, ept - pt)) {
if (*pt != '/') {
bpt = pt;
ept = pt + strlen(pt) - 1;
while (bpt < ept) {
c = *bpt;
*bpt++ = *ept;
*ept-- = c;
}
}
return (pt);
}