From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rV4-0002TH-3W for qemu-devel@nongnu.org; Mon, 23 May 2016 11:10:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4rUt-000498-VW for qemu-devel@nongnu.org; Mon, 23 May 2016 11:10:32 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:34003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rUt-00048s-K0 for qemu-devel@nongnu.org; Mon, 23 May 2016 11:10:23 -0400 Received: by mail-wm0-x242.google.com with SMTP id n129so16053401wmn.1 for ; Mon, 23 May 2016 08:10:23 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-252-58.clienti.tiscali.it. [78.12.252.58]) by smtp.gmail.com with ESMTPSA id ac2sm19250359wjc.35.2016.05.23.08.10.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 May 2016 08:10:22 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 23 May 2016 17:09:56 +0200 Message-Id: <1464016199-43768-22-git-send-email-pbonzini@redhat.com> In-Reply-To: <1464016199-43768-1-git-send-email-pbonzini@redhat.com> References: <1464016199-43768-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 21/24] coccinelle: add g_assert_cmp* to macro file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This helps applying semantic patches to unit tests. Signed-off-by: Paolo Bonzini --- scripts/cocci-macro-file.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h index eceb4be..9f2e72e 100644 --- a/scripts/cocci-macro-file.h +++ b/scripts/cocci-macro-file.h @@ -117,3 +117,9 @@ struct { \ type *tqe_next; /* next element */ \ type **tqe_prev; /* address of previous next element */ \ } + +/* From glib */ +#define g_assert_cmpint(a, op, b) g_assert(a op b) +#define g_assert_cmpuint(a, op, b) g_assert(a op b) +#define g_assert_cmphex(a, op, b) g_assert(a op b) +#define g_assert_cmpstr(a, op, b) g_assert(strcmp(a, b) op 0) -- 1.8.3.1