From owner-freebsd-hackers@freebsd.org Mon Jan 1 10:03:29 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1532EA166C for ; Mon, 1 Jan 2018 10:03:29 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id A5FAD66F5B for ; Mon, 1 Jan 2018 10:03:29 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id E91C327395; Mon, 1 Jan 2018 10:03:27 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id w01A3C5H069783 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 1 Jan 2018 10:03:12 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id w01A3C8h069782; Mon, 1 Jan 2018 10:03:12 GMT (envelope-from phk) To: Mark Millard cc: "Rodney W. Grimes" , FreeBSD Hackers Subject: Re: Is it considered to be ok to not check the return code of close(2) in base? In-reply-to: <559541DD-3287-4473-B7DE-B4DDC6860DF7@dsl-only.net> From: "Poul-Henning Kamp" References: <201801010305.w0135luG084158@pdx.rh.CN85.dnsmgr.net> <559541DD-3287-4473-B7DE-B4DDC6860DF7@dsl-only.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <69780.1514800992.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Mon, 01 Jan 2018 10:03:12 +0000 Message-ID: <69781.1514800992@critter.freebsd.dk> X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 10:03:30 -0000 -------- In message <559541DD-3287-4473-B7DE-B4DDC6860DF7@dsl-only.net>, Mark Milla= rd 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@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= .