aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorTim Vanderhoek <hoek@FreeBSD.org>1999-08-02 03:18:17 +0000
committerTim Vanderhoek <hoek@FreeBSD.org>1999-08-02 03:18:17 +0000
commit4ac29fd62e5710eaacd17268e50a3fd3b2b540c2 (patch)
tree678f9ef9050906c2089a2c721d047052a76388cc /share
parent0d6ab4a16a8d61a4fbb5235daa4742f5ea429850 (diff)
downloadsrc-4ac29fd62e5710eaacd17268e50a3fd3b2b540c2.tar.gz
src-4ac29fd62e5710eaacd17268e50a3fd3b2b540c2.zip
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.
Notes
Notes: svn path=/head/; revision=49361
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 b6ffcb78f65c..90a649bebb51 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: