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 __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. */