aboutsummaryrefslogtreecommitdiff
path: root/sbin/clri
diff options
context:
space:
mode:
authorPhilippe Charnier <charnier@FreeBSD.org>2005-05-29 16:07:10 +0000
committerPhilippe Charnier <charnier@FreeBSD.org>2005-05-29 16:07:10 +0000
commit8a1dff0c7318e6ed89db2ee4450167e7c487025d (patch)
treea4c9e5d11f6f669da63775b8ea7cfb336fda47d3 /sbin/clri
parent865059c8a88424279aaac8a736a2c3b0e0f6199b (diff)
downloadsrc-8a1dff0c7318e6ed89db2ee4450167e7c487025d.tar.gz
src-8a1dff0c7318e6ed89db2ee4450167e7c487025d.zip
Give variable an initial value. Use errx() instead of fprintf().
Notes
Notes: svn path=/head/; revision=146757
Diffstat (limited to 'sbin/clri')
-rw-r--r--sbin/clri/clri.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/clri/clri.c b/sbin/clri/clri.c
index d5a358d33d63..dc77a41c66d5 100644
--- a/sbin/clri/clri.c
+++ b/sbin/clri/clri.c
@@ -41,6 +41,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)clri.c 8.2 (Berkeley) 9/23/93";
#endif /* not lint */
#endif
+
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -85,6 +86,7 @@ main(int argc, char *argv[])
usage();
fs = *++argv;
+ sbp = NULL;
/* get the superblock. */
if ((fd = open(fs, O_RDWR, 0)) < 0)
@@ -102,10 +104,8 @@ main(int argc, char *argv[])
sbp->fs_bsize >= (int)sizeof(struct fs))
break;
}
- if (sblock_try[i] == -1) {
- fprintf(stderr, "Cannot find file system superblock\n");
- exit(2);
- }
+ if (sblock_try[i] == -1)
+ errx(2, "cannot find file system superblock");
bsize = sbp->fs_bsize;
/* remaining arguments are inode numbers. */