summaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/getcwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/getcwd.c')
-rw-r--r--sysdeps/mach/hurd/getcwd.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sysdeps/mach/hurd/getcwd.c b/sysdeps/mach/hurd/getcwd.c
index 039f1341d5..02699a7e84 100644
--- a/sysdeps/mach/hurd/getcwd.c
+++ b/sysdeps/mach/hurd/getcwd.c
@@ -185,14 +185,9 @@ __getcwd (char *buf, size_t size)
if (err)
goto errlose;
if (st.st_dev == thisdev && st.st_ino == thisino)
- break;
+ goto found;
}
}
-
- if (offset < dirdatasize)
- /* We got a match; avoid doing another dir_readdir, which will
- hose NENTRIES. */
- break;
}
if (err)
@@ -206,6 +201,7 @@ __getcwd (char *buf, size_t size)
goto errlose;
}
else
+ found:
{
/* Prepend the directory name just discovered. */