Is it considered to be ok to not check the return code of close(2) in base?

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Jan 1 10:03:30 UTC 2018


--------
In message <559541DD-3287-4473-B7DE-B4DDC6860DF7 at dsl-only.net>, Mark Millard wr
ites:

>"assert" indicates optional code, not required
>code. (This is despite its name.)

Assert statements are not debugging, although they greatly help
debugging, they are an integral part of the program, which documents
for the maintainers and the running system what assumptions are
being made.

Who ever added "#ifndef NDEBUG" not only failed Sensible Naming
101, they also totally misunderstood the nature of assert() as
a programming construct.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-hackers mailing list