[Swan-dev] passert.h: PASSERT should not return a value

Andrew Cagney andrew.cagney at gmail.com
Fri Aug 20 15:03:45 UTC 2021

    I don't know why PASSERT expands to an expression.  In any case, it
    should not be used as an expression.  In an attempt to prevent this,
    I've made it yield a void result.

git blame include/passert.h is revealing:

076039643e8 include/passert.h           (Andrew Cagney 2021-06-24 20:23:59
-0400 50)            true;

commit 076039643e87d6783b5f5cd08adfbd903e130f09
Author: Andrew Cagney <cagney at gnu.org>
Date:   Thu Jun 24 20:23:59 2021 -0400

    includes: allow if (!passert(...))

    mainly so it is easy to switch between pexpect()
    and passert().

(which is presumably to make debugging easier)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20210820/34fcdb30/attachment.html>

More information about the Swan-dev mailing list