[ovs-dev] [ovs-assert 1/4] util: Introduce ovs_assert macro.

Ethan Jackson ethan at nicira.com
Thu Jan 10 20:55:09 UTC 2013

Out of curiosity, did you consider the name xassert() as an alternative to
ovs_assert()?  It has the advantage of following our established convention.

+    static int reentry;

I'm not sure if the C spec strictly requires it, but I would feel more
comfortable if we initialized this to 0 explicitly.

> +    switch (reentry++) {
> +    case 0:
> +        VLOG_ABORT("%s: assertion %s failed in %s()",
> +                   where, condition, function);
> +        /* not reached */
Minor style bit I may go ahead and make this an abort() for clarity.  I.E.
    ovs_abort(); /* not reached */

Acked-by: Ethan Jackson <ethan at nicira.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130110/b3e326f9/attachment-0003.html>

More information about the dev mailing list