diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-12-16 14:59:10 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-12-17 07:07:40 -0500 |
commit | e742a3ef2d7cab398bf1f387aa694fd763971d74 (patch) | |
tree | cd3ff2b4637c2a73ae93a9c0ef9ff7ca02bc478c | |
parent | f88099bfd7acb3d17c4af8744e1dd9eb63eddf65 (diff) | |
download | sssd-e742a3ef2d7cab398bf1f387aa694fd763971d74.tar.gz sssd-e742a3ef2d7cab398bf1f387aa694fd763971d74.tar.xz sssd-e742a3ef2d7cab398bf1f387aa694fd763971d74.zip |
Fix unchecked return value in test_sysdb_attrs_to_list
https://fedorahosted.org/sssd/ticket/714
-rw-r--r-- | src/tests/sysdb-tests.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c index 797b18d63..c6d1678ce 100644 --- a/src/tests/sysdb-tests.c +++ b/src/tests/sysdb-tests.c @@ -2180,11 +2180,14 @@ START_TEST (test_sysdb_attrs_to_list) TALLOC_CTX *test_ctx = talloc_new(NULL); attrs_list[0] = sysdb_new_attrs(test_ctx); - sysdb_attrs_add_string(attrs_list[0], "test_attr", "attr1"); + ret = sysdb_attrs_add_string(attrs_list[0], "test_attr", "attr1"); + fail_if(ret, "Add string failed"); attrs_list[1] = sysdb_new_attrs(test_ctx); - sysdb_attrs_add_string(attrs_list[1], "test_attr", "attr2"); + ret = sysdb_attrs_add_string(attrs_list[1], "test_attr", "attr2"); + fail_if(ret, "Add string failed"); attrs_list[2] = sysdb_new_attrs(test_ctx); - sysdb_attrs_add_string(attrs_list[2], "nottest_attr", "attr3"); + ret = sysdb_attrs_add_string(attrs_list[2], "nottest_attr", "attr3"); + fail_if(ret, "Add string failed"); ret = sysdb_attrs_to_list(test_ctx, attrs_list, 3, "test_attr", &list); |