From: Jim Meyering Date: Sat, 15 Aug 1998 03:01:13 +0000 (+0000) Subject: (read_filesystem_list) [MOUNTED_GETMNT]: Don't infloop on getmnt(2) returning 0. X-Git-Tag: FILEUTILS-3_16u~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d7c2d4f7da490c5cb2f450ac31582446b33c049;p=thirdparty%2Fcoreutils.git (read_filesystem_list) [MOUNTED_GETMNT]: Don't infloop on getmnt(2) returning 0. Christian von Roques --- diff --git a/lib/mountlist.c b/lib/mountlist.c index 7660724529..ac25ee1892 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);