Module Name:    src
Committed By:   jruoho
Date:           Fri Apr 30 07:14:15 UTC 2010

Modified Files:
        src/lib/libc/stdlib: malloc.3

Log Message:
As err(3) instructs, use EXIT_FAILURE in the example.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/libc/stdlib/malloc.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/stdlib/malloc.3
diff -u src/lib/libc/stdlib/malloc.3:1.31 src/lib/libc/stdlib/malloc.3:1.32
--- src/lib/libc/stdlib/malloc.3:1.31	Fri Apr 30 07:00:51 2010
+++ src/lib/libc/stdlib/malloc.3	Fri Apr 30 07:14:15 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: malloc.3,v 1.31 2010/04/30 07:00:51 jruoho Exp $
+.\" $NetBSD: malloc.3,v 1.32 2010/04/30 07:14:15 jruoho Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -83,7 +83,7 @@
 be careful to avoid the following idiom:
 .Bd -literal -offset indent
 if ((p = malloc(number * size)) == NULL)
-	err(1, "malloc");
+	err(EXIT_FAILURE, "malloc");
 .Ed
 .Pp
 The multiplication may lead to an integer overflow.
@@ -97,7 +97,7 @@
 .Bd -literal -offset indent
 if (size && number > SIZE_MAX / size) {
 	errno = ENOMEM;
-	err(1, "overflow");
+	err(EXIT_FAILURE, "overflow");
 }
 .Ed
 .Pp

Reply via email to