mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Bruce noted that the use of err(), fixed to errx() in the last commit,
did not specify an exit code. This implies the use of either a hand- rolled err() (Bruce's suggestion) or a random error code (my suggestion), both of which are against the style guidelines. This commit specifies the correct error code (implicitly). This also changes the error message to be a little more helpful.
This commit is contained in:
parent
0d6ab4a16a
commit
4ac29fd62e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49361
@ -22,7 +22,7 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $Id: style.9,v 1.24 1999/06/27 02:38:45 mpp Exp $
|
||||
.\" $Id: style.9,v 1.25 1999/07/31 15:04:37 hoek Exp $
|
||||
.\"
|
||||
.Dd December 14, 1995
|
||||
.Dt STYLE 9
|
||||
@ -242,8 +242,11 @@ have a NOTREACHED comment.
|
||||
break;
|
||||
case 'n':
|
||||
num = strtol(optarg, &ep, 10);
|
||||
if (num <= 0 || *ep != '\e0')
|
||||
errx("illegal number -- %s", optarg);
|
||||
if (num <= 0 || *ep != '\e0') {
|
||||
warnx("illegal number, -n argument -- %s",
|
||||
optarg);
|
||||
usage();
|
||||
}
|
||||
break;
|
||||
case '?':
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user