[glib] g_test_expect_message: add some g_return_if_fail
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] g_test_expect_message: add some g_return_if_fail
- Date: Mon, 20 Aug 2012 20:26:57 +0000 (UTC)
commit d06c7a911ea28d9d8019b901f71bd12cfa2dd64d
Author: Ryan Lortie <desrt desrt ca>
Date: Mon Aug 20 16:25:09 2012 -0400
g_test_expect_message: add some g_return_if_fail
NULL domain is not supported and some might expect this to work, so make
sure they don't get the wrong idea...
glib/gmessages.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/glib/gmessages.c b/glib/gmessages.c
index c83d3e8..decda04 100644
--- a/glib/gmessages.c
+++ b/glib/gmessages.c
@@ -1101,6 +1101,10 @@ g_test_expect_message (const gchar *log_domain,
{
GTestExpectedMessage *expected;
+ g_return_if_fail (log_domain != NULL);
+ g_return_if_fail (log_level != 0);
+ g_return_if_fail (pattern != NULL);
+
expected = g_new (GTestExpectedMessage, 1);
expected->log_domain = g_strdup (log_domain);
expected->log_level = log_level;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]