[ovs-git] [openvswitch/ovs] 500db3: util: Document and rely on ovs_assert() always eva...

GitHub noreply at github.com
Thu Feb 1 19:25:44 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 500db308e2704fa9fc5ff69cdcd9cb3b22116e99
      https://github.com/openvswitch/ovs/commit/500db308e2704fa9fc5ff69cdcd9cb3b22116e99
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2018-02-01 (Thu, 01 Feb 2018)

  Changed paths:
    M include/openvswitch/util.h
    M lib/cmap.c
    M lib/conntrack.c
    M lib/hmapx.c
    M lib/odp-execute.c
    M lib/odp-util.c
    M lib/ofp-msgs.c
    M lib/ofp-util.c
    M lib/ovsdb-data.c
    M lib/shash.c
    M lib/sset.c
    M ofproto/ofproto-dpif-xlate.c
    M ovsdb/ovsdb-server.c
    M ovsdb/replication.c

  Log Message:
  -----------
  util: Document and rely on ovs_assert() always evaluating its argument.

The ovs_assert() macro always evaluates its argument, even when NDEBUG is
defined so that failure is ignored.  This behavior wasn't documented, and
thus a lot of code didn't rely on it.  This commit documents the behavior
and simplifies bits of code that heretofore didn't rely on it.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Reviewed-by: Yifeng Sun <pkusunyifeng at gmail.com>




More information about the git mailing list