tci: Fix build regression
commit79a71ea352292f905de146b38a4e9e3e7ad070a1
authorStefan Weil <sw@weilnetz.de>
Tue, 5 Apr 2016 20:24:51 +0000 (5 22:24 +0200)
committerStefan Weil <sw@weilnetz.de>
Wed, 6 Apr 2016 05:10:08 +0000 (6 07:10 +0200)
tree9294235f41b3718e1925522760ff8d4ff33f15ee
parenta671b0795ab1f517fa0ddadcaec7651a4567fb51
tci: Fix build regression

Commit d38ea87ac54af64ef611de434d07c12dc0399216 cleaned the include
statements which resulted in a wrong order of assert.h and the definition
of NDEBUG in tci.c. Normally NDEBUG modifies the definition of the assert
macro, but here this definition comes too late which results in a failing
build.

To fix this, a new macro tci_assert which depends on CONFIG_DEBUG_TCG
is introduced. Only builds with CONFIG_DEBUG_TCG will use assertions.
Even in this case, it is still possible to disable assertions by
defining NDEBUG via compiler settings.

Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
tci.c