Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Oct 2000 18:29:28 +1100 (EST)
From:      andrew@ugh.net.au
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   docs/22371: style(9) example violates style(9)
Message-ID:  <20001028072928.6CFB7A842@starbug.ugh.net.au>

next in thread | raw e-mail | index | archive | help

>Number:         22371
>Category:       docs
>Synopsis:       style(9) example violates style(9)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 28 00:30:01 PDT 2000
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001028072928.6CFB7A842>