src/utils_complain: Changed c_release() into a macro.
authorSebastian Harl <sh@tokkee.org>
Wed, 2 Jul 2008 14:29:07 +0000 (16:29 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Sun, 6 Jul 2008 12:28:34 +0000 (14:28 +0200)
commit6ddbe0026dea748db40ccc494b4f5048817b346a
tree111c864dcc4dc639498d46a005f789ba11e0d975
parent9e68a7714e1e7fba52d73de7117eb5338077a0d7
src/utils_complain: Changed c_release() into a macro.

While the c_complain*() functions are usually used in error conditions only,
c_release() is usually used whenever things went right (which should be the
more common case ;-)). In order to minimize the overhead in the latter case,
c_release() has been changed into a macro which checks if the complaint
actually has to be released and calls c_do_release() in that case. This
function then takes care of reporting the release-message (this is the
original implementation of c_release()). So, we remove the overhead of a
function call in the usual case, i.e. when we don't have to report any
messages.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/utils_complain.c
src/utils_complain.h