DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ilya Matveychikov <matvejchikov@gmail.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] debug: update assertion macro
Date: Fri, 15 Dec 2017 11:56:35 -0800	[thread overview]
Message-ID: <0ba9268f-6b78-25c6-e04d-660029c61656@intel.com> (raw)
In-Reply-To: <76A6A6A4-98AC-4765-9579-44100B4CE159@gmail.com>

On 11/19/2017 6:41 AM, Ilya Matveychikov wrote:
> 
> 
>> On Nov 19, 2017, at 12:18 PM, Ilya Matveychikov <matvejchikov@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@gmail.com>
>>
>> Fixes: 148f963fb532 ("xen: core library changes")
>> Cc: bruce.richardson@intel.com
>>
>> ---
>> Now it's incorrect to use complex expressions for assertion
>> like RTE_ASSERT((1 + 2) == 3). This patch makes it possible.
> 
> Update.
> 
> 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
> character.

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@intel.com>

  reply	other threads:[~2017-12-15 19:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-19  8:18 Ilya Matveychikov
2017-11-19 14:41 ` Ilya Matveychikov
2017-12-15 19:56   ` Ferruh Yigit [this message]
2017-12-22  2:12     ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0ba9268f-6b78-25c6-e04d-660029c61656@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=matvejchikov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).