diff options
author | Jim Meyering <jim@meyering.net> | 1998-08-15 03:01:13 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-08-15 03:01:13 +0000 |
commit | 9d7c2d4f7da490c5cb2f450ac31582446b33c049 (patch) | |
tree | 00d4fbc6982afc6929ef425885e0e7603ad037a6 /lib | |
parent | 888da5c3590abe356a8c1e5b53c81deaa47d82ae (diff) | |
download | coreutils-9d7c2d4f7da490c5cb2f450ac31582446b33c049.tar.xz |
(read_filesystem_list) [MOUNTED_GETMNT]: Don't infloop on getmnt(2) returning 0.
Christian von Roques
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mountlist.c | 4 |
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); |