]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): Move the test of the result of the read_filesystem_list call
authorJim Meyering <jim@meyering.net>
Tue, 30 Jun 1998 02:27:51 +0000 (02:27 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 30 Jun 1998 02:27:51 +0000 (02:27 +0000)
up out of if-block -- code in the else-block depends on it too.

src/df.c

index 097cafccd6cc81381c0cfe97d3eb3291ad10b912..d23ae2a306de86dfb4c811e893ce4716d752b369 100644 (file)
--- a/src/df.c
+++ b/src/df.c
@@ -704,13 +704,14 @@ main (int argc, char **argv)
                           || print_type),
                          show_all_fs);
 
+  if (mount_list == NULL)
+    error (1, errno, _("cannot read table of mounted filesystems"));
+
   if (require_sync)
     sync ();
 
   if (optind == argc)
     {
-      if (mount_list == NULL)
-       error (1, errno, _("cannot read table of mounted filesystems"));
       print_header ();
       show_all_entries ();
     }