xmalloc_cacheline API is relatively new.  It's better
not to inherit the kludge from xmalloc.  This kind of
kludge rather hurts these days.

Signed-off-by: YAMAMOTO Takashi <yamam...@valinux.co.jp>
---
 lib/util.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/util.c b/lib/util.c
index 1ebe22a..464d730 100644
--- a/lib/util.c
+++ b/lib/util.c
@@ -203,6 +203,7 @@ xmalloc_cacheline(size_t size)
      *     - Space following the payload up to the end of the cache line, so
      *       that the end of the payload doesn't potentially share a cache line
      *       with some following block. */
+    ovs_assert(size != 0);
     base = xmalloc((CACHE_LINE_SIZE - 1)
                    + ROUND_UP(MEM_ALIGN + size, CACHE_LINE_SIZE));
 
-- 
1.8.3.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to