From patchwork Fri May 8 22:00:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 470199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 89B6714010F for ; Sat, 9 May 2015 08:01:13 +1000 (AEST) Received: from localhost ([::1]:57711 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqqKV-0007gI-7V for incoming@patchwork.ozlabs.org; Fri, 08 May 2015 18:01:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqqJY-0006Uw-Ka for qemu-devel@nongnu.org; Fri, 08 May 2015 18:00:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqqJU-0005Xq-Kg for qemu-devel@nongnu.org; Fri, 08 May 2015 18:00:12 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:41663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqqJU-0005XV-C6; Fri, 08 May 2015 18:00:08 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 00A494077F; Sat, 9 May 2015 01:00:07 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.corpit.ru (Postfix) with SMTP id D05C6953; Sat, 9 May 2015 01:00:06 +0300 (MSK) Received: (nullmailer pid 10319 invoked by uid 1000); Fri, 08 May 2015 22:00:06 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Sat, 9 May 2015 01:00:04 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 86.62.121.231 Cc: qemu-trivial@nongnu.org, Michael Tokarev Subject: [Qemu-devel] [PULL 4/5] glib-compat.h: change assert to g_assert X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org include/glib-compat.h defines a bunch of functions based on glib primitives, and uses assert() without including assert.h. Replace assert() with g_assert() to make the file more self-contained, and to fix compilation breakage after 28507a415a9b1e. Reported-by: Laurent Desnogues Signed-off-by: Michael Tokarev Tested-by: Laurent Desnogues --- include/glib-compat.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/glib-compat.h b/include/glib-compat.h index 011352b..28d9f15 100644 --- a/include/glib-compat.h +++ b/include/glib-compat.h @@ -115,7 +115,7 @@ static inline void g_mutex_init(CompatGMutex *mutex) static inline void g_mutex_clear(CompatGMutex *mutex) { - assert(mutex->once.status != G_ONCE_STATUS_PROGRESS); + g_assert(mutex->once.status != G_ONCE_STATUS_PROGRESS); if (mutex->once.retval) { g_mutex_free((GMutex *) mutex->once.retval); } @@ -155,7 +155,7 @@ static inline void g_cond_init(CompatGCond *cond) static inline void g_cond_clear(CompatGCond *cond) { - assert(cond->once.status != G_ONCE_STATUS_PROGRESS); + g_assert(cond->once.status != G_ONCE_STATUS_PROGRESS); if (cond->once.retval) { g_cond_free((GCond *) cond->once.retval); } @@ -164,7 +164,7 @@ static inline void g_cond_clear(CompatGCond *cond) static inline void (g_cond_wait)(CompatGCond *cond, CompatGMutex *mutex) { - assert(mutex->once.status != G_ONCE_STATUS_PROGRESS); + g_assert(mutex->once.status != G_ONCE_STATUS_PROGRESS); g_once(&cond->once, do_g_cond_new, NULL); g_cond_wait((GCond *) cond->once.retval, (GMutex *) mutex->once.retval); }