assert.3: Minor clean-ups

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-06-03 05:39:05 -05:00
parent f34fcbb86b
commit 4d644289dd
1 changed files with 9 additions and 5 deletions

View File

@ -35,9 +35,11 @@ assert \- abort the program if assertion is false
.BI "void assert(scalar " expression );
.fi
.SH DESCRIPTION
This macro can help programmers find bugs in their programs, or handle exceptional cases
via a crash that will produce limited debugging output. The function will print an
error message to standard error, e.g., "assertion failed in file foo.c, function do_bar(), line 1287"
This macro can help programmers find bugs in their programs,
or handle exceptional cases
via a crash that will produce limited debugging output.
The function will print an error message to standard error
(e.g., "assertion failed in file foo.c, function do_bar(), line 1287")
and terminate the program by calling
.BR abort (3)
if
@ -50,11 +52,13 @@ is defined at the moment
.I <assert.h>
was last included, the macro
.BR assert ()
generates no code, and hence does nothing at all. It is not recommended to define
generates no code, and hence does nothing at all.
It is not recommended to define
.B NDEBUG
if using
.BR assert ()
to detect error conditions since the software may behave non-deterministically.
to detect error conditions since the software
may behave non-deterministically.
.SH RETURN VALUE
No value is returned.
.SH ATTRIBUTES