diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-05-13 13:43:41 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-05-13 13:43:41 -0500 |
commit | fd6c902572b339f0da9d8a29cd8240f08f26ace8 (patch) | |
tree | c971c2adfe8922ae2c587e7435ac9d6036ed111d | |
parent | 1ddc7ebf197ce7d6eabf6fc1493e095e004eac2f (diff) | |
download | ofono-fd6c902572b339f0da9d8a29cd8240f08f26ace8.tar.bz2 |
test-stkutil: Handle NULL strings
g_str_equal does not handle NULL strings
-rw-r--r-- | unit/test-stkutil.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c index 2fa449d8..59e69884 100644 --- a/unit/test-stkutil.c +++ b/unit/test-stkutil.c @@ -84,7 +84,11 @@ static void check_item(const struct stk_item *command, const struct stk_item *test) { g_assert(command->id == test->id); - g_assert(g_str_equal(command->text, test->text)); + + if (command->text == NULL) + g_assert(test->text == NULL); + else + g_assert(g_str_equal(command->text, test->text)); } /* Defined in TS 102.223 Section 8.10 */ |