From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 3CE437CFA for ; Sun, 19 Nov 2017 09:18:53 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id 5so12161099wmk.1 for ; Sun, 19 Nov 2017 00:18:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=nWjZSrH3LeHf+LrtLOAZODH1ntxrWWW3vJA54lLa2Ec=; b=fatVazmROrmjBybAF47n+MzIkcv59tEu1qoU7CMPq8ZPjsttu2PzvcmbVI6YZTn9Q7 kNrflzkvdGwhDiQLu0e6OGTzduHmGHsKfdFrTzPPkoPx0uSO84fxgLfb3/OyvdGQFtDU Tip/J9Gwahl+ep3uKGZ8Rehv3syDobDqtmyENkRmSo4FbUdNxYizvPxKxBjodkVxCkxE f3npu3r9OL1/vRadib1L/lBtwr6Fqn13JLSD52u0E/kmPgNbp7cAMjiuEybX/5NFIHr3 C4l73wXsUXWkc8Vv9A+Ky907jCcAt4RDuXZ7DIuDFgzBbOMESOQNRCcUlgdhMjQs5wCQ GJpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=nWjZSrH3LeHf+LrtLOAZODH1ntxrWWW3vJA54lLa2Ec=; b=BsuXe4rk2Aet/CpIfEzbOu7c+Bv2USLmzkbcBxZW68zwhPymHJ6UwXBBOGowvOXCRJ jgEWmxDBnLIPri+GIme5XuNhZFlbDbbsm5GHEdZZO66VH12pCP937cKVhVE6Dy6grn2W swGhrw9SBh3HcjjZ5mXmu8EyhptEUgOrm2KimYTbNLI+MkCPuPPOzB8Q+s9Qahh+bfxr AtsOq3XQ1wBvSemqtayaieyNQWHcpAj9jMMOjXzq5P0kUb6YTifQHBWPTBYUrjNZ9fne W+wt2gFdYka2BUvuY/YTQR8Kw7/HPqmkLg0eBAwVORflNrZpwB4OFvqJst67oFbICkvK IOAg== X-Gm-Message-State: AJaThX4E/nl1g30jjQjWhXrTjfG3GlTAqC8LO8PmjNQ6y1/fTUdrzBhF tkAyF03iM124IU62R+k9FJsQHyTS X-Google-Smtp-Source: AGs4zMaO7lmnO9SxedqU9S0zJQb5B/K5x+ux0f+mm4PArGzU7vJPTU/ZiU8J7LQuTmJNv0yjGZk/Yw== X-Received: by 10.80.153.210 with SMTP id n18mr14683546edb.281.1511079532556; Sun, 19 Nov 2017 00:18:52 -0800 (PST) Received: from [10.61.0.167] (bba193485.alshamil.net.ae. [217.165.96.191]) by smtp.gmail.com with ESMTPSA id w14sm5577989edi.26.2017.11.19.00.18.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Nov 2017 00:18:51 -0800 (PST) From: Ilya Matveychikov Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) Message-Id: <9B0F484B-2803-4882-B324-8E4B1AFEFAF2@gmail.com> Date: Sun, 19 Nov 2017 12:18:49 +0400 To: dev@dpdk.org X-Mailer: Apple Mail (2.3445.4.7) Subject: [dpdk-dev] [PATCH] debug: update assertion macro X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Nov 2017 08:18:53 -0000 Update RTE_VERIFY macro to make it possible to use complex expressions in RTE_ASSERT. Signed-off-by: Ilya V. Matveychikov 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) =3D=3D 3). This patch makes it possible. lib/librte_eal/common/include/rte_debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/common/include/rte_debug.h = b/lib/librte_eal/common/include/rte_debug.h index 79b67b3ec..fbb3bb5e5 100644 --- a/lib/librte_eal/common/include/rte_debug.h +++ b/lib/librte_eal/common/include/rte_debug.h @@ -86,7 +86,7 @@ void rte_dump_registers(void); #endif #define RTE_VERIFY(exp) do { = \ if (unlikely(!(exp))) = \ - rte_panic("line %d\tassert \"" #exp "\" failed\n", = __LINE__); \ + rte_panic("line %d\tassert \"%s\" failed\n", __LINE__, = #exp); \ } while (0) /* -- 2.15.0=