rculfhash: use do {} while (0) for dbg_printf()
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 7 May 2012 15:10:52 +0000 (11:10 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 7 May 2012 15:10:52 +0000 (11:10 -0400)
commit87fbf522618013b675cfd10863630506ad882ef7
tree97795a162376e68b66b395af8ea0e870f607f387
parent5f177b1c042fd3f1b746dee55a90cc503c5276ee
rculfhash: use do {} while (0) for dbg_printf()

found by clang(make CC=clang).

avoid empty statement.
-------------------------
if (condition)
        dbg_printf()  /* forget ";", but compiler say nothing if dbg_printf() is empty */
statement;
-------------------------

also add printf format check.
(we can use gcc extention "__printf(1, 2)" to declare a dummy inline function
to do the check, but I use "printf()" directly here)

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash-internal.h
This page took 0.025418 seconds and 4 git commands to generate.