mirror of
https://github.com/coreutils/coreutils.git
synced 2025-01-20 15:13:27 +08:00
(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.
This commit is contained in:
parent
1c84606b56
commit
3fa1d4bb24
5
src/df.c
5
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 ();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user