From: Jim Meyering Date: Tue, 30 Jun 1998 02:27:51 +0000 (+0000) Subject: (main): Move the test of the result of the read_filesystem_list call X-Git-Tag: FILEUTILS-3_16q~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fa1d4bb24d06dc358501b63ee4ca49fd34b2647;p=thirdparty%2Fcoreutils.git (main): Move the test of the result of the read_filesystem_list call up out of if-block -- code in the else-block depends on it too. --- diff --git a/src/df.c b/src/df.c index 097cafccd6..d23ae2a306 100644 --- 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 (); }