summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2015-05-07 13:38:02 +0300
committerMichael Tokarev <mjt@tls.msk.ru>2015-05-08 14:11:10 +0300
commitf20f2a1f339b99f5b840367236ddce9d9736247c (patch)
treedcfa8d95d634afcfc4e522ebd16f720fb1163877 /include
parentac9541579eb95b0b8c93ca58d0a074e1f22cd55a (diff)
downloadqemu-f20f2a1f339b99f5b840367236ddce9d9736247c.zip
glib-compat.h: change assert to g_assert
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 <laurent.desnogues@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/glib-compat.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/glib-compat.h b/include/glib-compat.h
index 011352b2b6..28d9f15bd3 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);
}