diff options
author | Pavel Březina <pbrezina@redhat.com> | 2015-07-27 17:24:45 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-07-27 22:48:13 +0200 |
commit | 166a622bcba319aaa7190fbc348af887cbba30bf (patch) | |
tree | 399d0802efa07403b6dfe23ad3ea23373e52fff3 | |
parent | c2cc00e8d70c4df880d76093d4b0e3ee7f2ee23f (diff) | |
download | sssd-166a622bcba319aaa7190fbc348af887cbba30bf.tar.gz sssd-166a622bcba319aaa7190fbc348af887cbba30bf.tar.xz sssd-166a622bcba319aaa7190fbc348af887cbba30bf.zip |
VIEWS TEST: add null-check
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
-rw-r--r-- | src/tests/cmocka/test_sysdb_views.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tests/cmocka/test_sysdb_views.c b/src/tests/cmocka/test_sysdb_views.c index 1fb598219..123d4c5cb 100644 --- a/src/tests/cmocka/test_sysdb_views.c +++ b/src/tests/cmocka/test_sysdb_views.c @@ -225,10 +225,12 @@ void test_sysdb_add_overrides_to_object(void **state) assert_non_null(orig); tmp_str = talloc_strdup(orig, "ORIGNAME"); + assert_non_null(tmp_str); ret = ldb_msg_add_string(orig, SYSDB_NAME, tmp_str); assert_int_equal(ret, EOK); tmp_str = talloc_strdup(orig, "ORIGGECOS"); + assert_non_null(tmp_str); ret = ldb_msg_add_string(orig, SYSDB_GECOS, tmp_str); assert_int_equal(ret, EOK); @@ -236,18 +238,22 @@ void test_sysdb_add_overrides_to_object(void **state) assert_non_null(override); tmp_str = talloc_strdup(override, "OVERRIDENAME"); + assert_non_null(tmp_str); ret = ldb_msg_add_string(override, SYSDB_NAME, tmp_str); assert_int_equal(ret, EOK); tmp_str = talloc_strdup(override, "OVERRIDEGECOS"); + assert_non_null(tmp_str); ret = ldb_msg_add_string(override, SYSDB_GECOS, tmp_str); assert_int_equal(ret, EOK); tmp_str = talloc_strdup(override, "OVERRIDEKEY1"); + assert_non_null(tmp_str); ret = ldb_msg_add_string(override, SYSDB_SSH_PUBKEY, tmp_str); assert_int_equal(ret, EOK); tmp_str = talloc_strdup(override, "OVERRIDEKEY2"); + assert_non_null(tmp_str); ret = ldb_msg_add_string(override, SYSDB_SSH_PUBKEY, tmp_str); assert_int_equal(ret, EOK); |