summaryrefslogtreecommitdiffstats
path: root/sbin/dumpfs
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2003-01-18 04:20:20 +0000
committerjmallett <jmallett@FreeBSD.org>2003-01-18 04:20:20 +0000
commit406bb0cfa57d3d013f9ff0e57f4c2e50b21decaa (patch)
tree17c849c4611057aa93a22a660eb975e173a6ce9c /sbin/dumpfs
parent40b68c17b274224ba02eef00e249fc76851cfc1e (diff)
downloadFreeBSD-src-406bb0cfa57d3d013f9ff0e57f4c2e50b21decaa.zip
FreeBSD-src-406bb0cfa57d3d013f9ff0e57f4c2e50b21decaa.tar.gz
Simplify conditional.
Diffstat (limited to 'sbin/dumpfs')
-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 9d5c209..88d7b9a 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);
}
OpenPOWER on IntegriCloud