Fix ht default size test
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 12 Jan 2012 19:39:23 +0000 (14:39 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 12 Jan 2012 19:39:23 +0000 (14:39 -0500)
commitdc78d159de0471583f04ba6dae2b0808b540844f
tree9ed7c83a6b6e670a592df0acdb1737e03faa72cd
parent2c1dd183d5e75a133090c65ecb4ff326981b3ad9
Fix ht default size test

in the line:

  size != 0 ? : (size = DEFAULT_HT_SIZE);

we should notice that the lack of ( ) around "size != 0" leads to the
following behavior: the compiler will try to evaluate

  "0 ? : (size = DEFAULT_HT_SIZE)"

and compare it to size, which is not the expected behavior.

Use a standard "if (cond)" test instead. The ? : expression is not
needed here anyway, it just complicates the code.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ht/lttng-ht.c
This page took 0.026573 seconds and 5 git commands to generate.