aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/dumpfs/dumpfs.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c
index 9d5c209e1fe5..88d7b9afb6f1 100644
--- a/sbin/dumpfs/dumpfs.c
+++ b/sbin/dumpfs/dumpfs.c
@@ -244,12 +244,10 @@ dumpfs(const char *name)
ufs_disk_close(&disk);
return (0);
-err: if (errno || disk.d_error != NULL) {
- if (disk.d_error != NULL)
- warnx("%s: %s", name, disk.d_error);
- else
- warn("%s", name);
- }
+err: if (disk.d_error != NULL)
+ warnx("%s: %s", name, disk.d_error);
+ else if (errno)
+ warn("%s", name);
ufs_disk_close(&disk);
return (1);
}