Fix: bogus mask on error.h PRINT types
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 18 May 2016 18:04:14 +0000 (14:04 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 20 May 2016 19:21:58 +0000 (15:21 -0400)
commit45308aadb46cc1eb4f1881a6b9f6c5ce49c7c7fe
treee898303c599cc08903569a8587834c277a0e32ff
parent64a269c3d21805e4053ab4da67f330b03bd1bfbf
Fix: bogus mask on error.h PRINT types

PRINT_ERR maps to 0x1, PRINT_WARN maps to 0x2, which is fine so far to
use as masks, but PRINT_BUG maps to 0x3, which is the same as both
PRINT_ERR and PRINT_WARN, and does not make sense to use in masks with
__lttng_print:

  (type & (PRINT_WARN | PRINT_ERR | PRINT_BUG))

Fix this by ensuring PRINT_BUG has its own mask, and express all
constants as shifts to eliminate the risk of re-introducing a similar
bug in the future.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/error.h
This page took 0.024987 seconds and 4 git commands to generate.