Bug #1326
closedvnconfig trivial patch
0%
Description
Salute.
In good faith and in my attempt to avoid a faux pas, I hereby ask for
rewiew regarding this trivial patch.
I don't see the purpose of calling anything after an err() call, since
err itself exits (and never fails).
Cheers,
Stathis
diff --git a/usr.sbin/vnconfig/vnconfig.c b/usr.sbin/vnconfig/vnconfig.c
index 81d7000..7222e07 100644
--- a/usr.sbin/vnconfig/vnconfig.c
+++ b/usr.sbin/vnconfig/vnconfig.c@ -297,10 +297,8
@ getinfo( const char *vname )
snprintf(vnpath, sizeof(vnpath), "/dev/vn%d", i);
vd = open(vnpath, O_RDONLY);
- if (vd < 0) {
+ if (vd < 0)
err(1, "open: %s", vnpath);
- return 1;
- }
for (; i<printlim; i++) {
@ -325,9 +323,8
@ getinfo( const char *vname )
continue;
}
else {
- err(1, "ioctl: %s", vname);
close(vd);
- return 1;
+ err(1, "ioctl: %s", vname);
}
}
}
Updated by Anonymous over 15 years ago
Dillon commented on it at #dragonflybsd.
Thanks, committed.