summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorhoek <hoek@FreeBSD.org>1999-08-02 03:18:17 +0000
committerhoek <hoek@FreeBSD.org>1999-08-02 03:18:17 +0000
commite8fde6f5707d9f1f85b8bb2cc7de45387f61f7b2 (patch)
tree44990afb36950bc81df2cd3488225a9b62346c34 /share
parentc790088cf6511de19be83cd5a1ca24ad896d2be1 (diff)
downloadFreeBSD-src-e8fde6f5707d9f1f85b8bb2cc7de45387f61f7b2.zip
FreeBSD-src-e8fde6f5707d9f1f85b8bb2cc7de45387f61f7b2.tar.gz
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.
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/style.99
1 files changed, 6 insertions, 3 deletions
diff --git a/share/man/man9/style.9 b/share/man/man9/style.9
index b6ffcb7..90a649b 100644
--- a/share/man/man9/style.9
+++ b/share/man/man9/style.9
@@ -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:
OpenPOWER on IntegriCloud