(read_filesystem_list) [MOUNTED_GETMNT]: Don't infloop on getmnt(2) returning 0.
authorJim Meyering <jim@meyering.net>
Sat, 15 Aug 1998 03:01:13 +0000 (03:01 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 15 Aug 1998 03:01:13 +0000 (03:01 +0000)
Christian von Roques

lib/mountlist.c

index 7660724..ac25ee1 100644 (file)
@@ -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);