summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@collabora.com>2012-06-15 14:36:42 -0400
committerThibault Saunier <thibault.saunier@collabora.com>2012-06-19 09:03:05 -0400
commit2add3f7df7c5c191daa837bf068c5d96aa73c464 (patch)
treea2959435ed5a70a2a180afd2a5d21afbb0326373
parent049b726ba390db39e2cc84c7efd8d800d5835534 (diff)
lib: Use the insanity_test_get_string_argument helper
-rw-r--r--lib/insanity/insanitytest.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/insanity/insanitytest.c b/lib/insanity/insanitytest.c
index 95c5e23..fe124d5 100644
--- a/lib/insanity/insanitytest.c
+++ b/lib/insanity/insanitytest.c
@@ -788,9 +788,9 @@ insanity_test_done (InsanityTest * test)
static gboolean
on_setup (InsanityTest * test)
{
- GValue log_level = { 0 };
gboolean ret = TRUE;
- const char *log_level_string, *ptr;
+ const gchar *ptr;
+ gchar *log_level;
LOCK (test);
if (test->priv->runlevel != rl_idle) {
@@ -799,10 +799,9 @@ on_setup (InsanityTest * test)
}
UNLOCK (test);
- insanity_test_get_argument (test, "log-level", &log_level);
+ insanity_test_get_string_argument (test, "log-level", &log_level);
LOCK (test);
- log_level_string = g_value_get_string (&log_level);
- for (ptr = log_level_string; *ptr;) {
+ for (ptr = log_level; *ptr;) {
const char *colon, *end, *slev;
char *category = NULL, *lptr = NULL;
unsigned long level;
@@ -842,7 +841,6 @@ on_setup (InsanityTest * test)
ptr = *end ? end + 1 : end;
}
UNLOCK (test);
- g_value_unset (&log_level);
g_signal_emit (test, setup_signal, 0, &ret);