summaryrefslogtreecommitdiff
path: root/lib/mountlist.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-08-15 03:01:13 +0000
committerJim Meyering <jim@meyering.net>1998-08-15 03:01:13 +0000
commit9d7c2d4f7da490c5cb2f450ac31582446b33c049 (patch)
tree00d4fbc6982afc6929ef425885e0e7603ad037a6 /lib/mountlist.c
parent888da5c3590abe356a8c1e5b53c81deaa47d82ae (diff)
downloadcoreutils-9d7c2d4f7da490c5cb2f450ac31582446b33c049.tar.xz
(read_filesystem_list) [MOUNTED_GETMNT]: Don't infloop on getmnt(2) returning 0.
Christian von Roques
Diffstat (limited to 'lib/mountlist.c')
-rw-r--r--lib/mountlist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mountlist.c b/lib/mountlist.c
index 766072452..ac25ee189 100644
--- a/lib/mountlist.c
+++ b/lib/mountlist.c
@@ -393,8 +393,8 @@ read_filesystem_list (int need_fs_type)
struct fs_data fsd;
while (errno = 0,
- 0 <= (val = getmnt (&offset, &fsd, sizeof (fsd), NOSTAT_MANY,
- (char *) 0)))
+ 0 < (val = getmnt (&offset, &fsd, sizeof (fsd), NOSTAT_MANY,
+ (char *) 0)))
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (fsd.fd_req.devname);