[dpdk-dev] [PATCH] debug: update assertion macro
ferruh.yigit at intel.com
Fri Dec 22 03:12:04 CET 2017
On 12/15/2017 11:56 AM, Ferruh Yigit wrote:
> On 11/19/2017 6:41 AM, Ilya Matveychikov wrote:
>>> On Nov 19, 2017, at 12:18 PM, Ilya Matveychikov <matvejchikov at gmail.com> wrote:
>>> Update RTE_VERIFY macro to make it possible to use complex expressions
>>> in RTE_ASSERT.
>>> Signed-off-by: Ilya V. Matveychikov <matvejchikov at gmail.com>
>>> Fixes: 148f963fb532 ("xen: core library changes")
>>> Cc: bruce.richardson at intel.com
>>> Now it's incorrect to use complex expressions for assertion
>>> like RTE_ASSERT((1 + 2) == 3). This patch makes it possible.
>> Now it’s possible to have % char inside the expression, for example:
>> RTE_ASSERT((sizeof(some_struct) % 64) == 0)
>> Before the patch, “%" sign acts like a conversion specification beginning
> previous sample is not correct, complex expressions "RTE_ASSERT((1 + 2) == 3)"
> are working fine.
> But you are right "%" causing problem, and this patch is fixing it.
> Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
Applied to dpdk/master, thanks.
Note added into commit log.
More information about the dev