Received: from eggs.gnu.org ([2001:4830:134:3::10]:41443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqJny-0001cu-4k for qemu-devel@nongnu.org; Thu, 07 May 2015 07:17:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqJnu-00035X-0T for qemu-devel@nongnu.org; Thu, 07 May 2015 07:17:26 -0400 From: Michael Tokarev Date: Thu, 7 May 2015 13:41:00 +0300 Message-Id: <1430995260-31458-1-git-send-email-mjt@msgid.tls.msk.ru> Subject: [Qemu-devel] [PATCH] glib-compat.h: change assert to g_assert List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Michael Tokarev 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 --- 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); } -- 2.1.4