From andrew@ugh.net.au  Sat Oct 28 00:29:35 2000
Return-Path: <andrew@ugh.net.au>
Received: from starbug.ugh.net.au (starbug.ugh.net.au [203.31.238.37])
	by hub.freebsd.org (Postfix) with ESMTP id 88CAB37B479
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Oct 2000 00:29:34 -0700 (PDT)
Received: by starbug.ugh.net.au (Postfix, from userid 1000)
	id 6CFB7A842; Sat, 28 Oct 2000 18:29:28 +1100 (EST)
Message-Id: <20001028072928.6CFB7A842@starbug.ugh.net.au>
Date: Sat, 28 Oct 2000 18:29:28 +1100 (EST)
From: andrew@ugh.net.au
Reply-To: andrew@ugh.net.au
To: FreeBSD-gnats-submit@freebsd.org
Subject: style(9) example violates style(9)
X-Send-Pr-Version: 3.2

>Number:         22371
>Category:       docs
>Synopsis:       style(9) example violates style(9)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 28 00:30:01 PDT 2000
>Closed-Date:    Sat Oct 28 03:06:59 PDT 2000
>Last-Modified:  Sat Oct 28 03:07:12 PDT 2000
>Originator:     Andrew
>Release:        FreeBSD 4.1.1-STABLE i386
>Organization:
UgH!
>Environment:

	

>Description:

In style(9) there is an example of a usage function that has the line:

exit(1);

style(9) states elsewhere:

Exits should be 0 on success, or according to the predefined values in
sysexits(3).

Presumably that should therefore read:

exit(EX_USAGE);

I thought I PRed about this years ago but I can't find it when I do a search
so sorry if this is a duplicate.

>How-To-Repeat:

	

>Fix:


--- style.9.orig	Sat Oct 28 17:20:44 2000
+++ style.9	Sat Oct 28 17:21:17 2000
@@ -530,7 +530,7 @@
 .Ed
 .Bd -literal -offset 0i
 	(void)fprintf(stderr, "usage: f [-ab]\en");
-	exit(1);
+	exit(EX_USAGE);
 }
 .Ed
 .Pp

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: alex 
State-Changed-When: Sat Oct 28 03:06:59 PDT 2000 
State-Changed-Why:  
Committed, thanks 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22371 
>Unformatted:
