Project

General

Profile

Actions

Bug #1326

closed

vnconfig trivial patch

Added by Anonymous about 15 years ago. Updated about 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

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&lt;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);
}
}
}

Actions #1

Updated by Anonymous about 15 years ago

Dillon commented on it at #dragonflybsd.

Thanks, committed.

Actions

Also available in: Atom PDF