[sheepdog] [PATCH] move assert definition from util.h to logger.h
Hitoshi Mitake
mitake.hitoshi at gmail.com
Thu Jul 11 06:40:35 CEST 2013
At Thu, 11 Jul 2013 13:11:57 +0900,
MORITA Kazutaka wrote:
>
> If we don't use a logger, we don't need to define our assert. In that
> sense, assert() should be defined in logger.h. The only problem is
> that assert can be used before including logger.h. To avoid it, this
> patch adds an #error directive to detect assert definition before
> logger.h.
>
> This fixes a compiler error which happens when NDEBUG is not defined.
>
> Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> ---
> include/compiler.h | 3 +++
> include/logger.h | 14 +++++++++-----
> include/sheep.h | 2 +-
> include/sheepdog_proto.h | 3 ++-
> include/util.h | 24 +++++-------------------
> lib/event.c | 2 +-
> lib/net.c | 2 +-
> lib/util.c | 3 +--
> lib/work.c | 2 +-
> sheep/sheep_priv.h | 1 +
> sheepfs/volume.c | 1 -
> shepherd/shepherd.c | 1 -
> 12 files changed, 25 insertions(+), 33 deletions(-)
>
Looks good to me and sorry for my mistake in the previous patchset.
Reviewed-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
Thanks,
Hitoshi
More information about the sheepdog
mailing list