diff options
author | Andreas Schneider <asn@samba.org> | 2016-06-22 15:15:05 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2016-06-22 19:25:20 +0200 |
commit | 5499cff2014e64ab9b40f038631a9b8eb847ca03 (patch) | |
tree | 51fbc65abf6b71b104e1033bcfb664059a62a0e5 /source4/torture | |
parent | 7bac35e7fd6d2e580648e0028e114626edf3dc2e (diff) | |
download | samba-5499cff2014e64ab9b40f038631a9b8eb847ca03.tar.gz |
s3-torture: Do some code hygiene in the ldb test
Coverity is confused if in a expresion we use = and not ==.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/ldb/ldb.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source4/torture/ldb/ldb.c b/source4/torture/ldb/ldb.c index 62104197ad5..7ea9726d520 100644 --- a/source4/torture/ldb/ldb.c +++ b/source4/torture/ldb/ldb.c @@ -1084,8 +1084,9 @@ static bool torture_ldb_unpack(struct torture_context *torture) const char *ldif_text = dda1d01d_ldif; struct ldb_ldif ldif; + ldb = samba_ldb_init(mem_ctx, torture->ev, NULL, NULL, NULL); torture_assert(torture, - ldb = samba_ldb_init(mem_ctx, torture->ev, NULL, NULL, NULL), + ldb != NULL, "Failed to init ldb"); torture_assert_int_equal(torture, ldb_unpack_data(ldb, &data, msg), 0, @@ -1111,12 +1112,14 @@ static bool torture_ldb_parse_ldif(struct torture_context *torture) struct ldb_val data = data_blob_const(dda1d01d_bin, sizeof(dda1d01d_bin)); struct ldb_message *msg = ldb_msg_new(mem_ctx); + ldb = samba_ldb_init(mem_ctx, torture->ev, NULL,NULL,NULL); torture_assert(torture, - ldb=samba_ldb_init(mem_ctx, torture->ev, NULL,NULL,NULL), + ldb != NULL, "Failed to init ldb"); + ldif = ldb_ldif_read_string(ldb, &ldif_text); torture_assert(torture, - ldif = ldb_ldif_read_string(ldb, &ldif_text), + ldif != NULL, "ldb_ldif_read_string failed"); torture_assert_int_equal(torture, ldif->changetype, LDB_CHANGETYPE_NONE, "changetype is incorrect"); @@ -1147,8 +1150,9 @@ static bool torture_ldb_unpack_only_attr_list(struct torture_context *torture) const char *ldif_text; struct ldb_ldif ldif; + ldb = samba_ldb_init(mem_ctx, torture->ev, NULL, NULL, NULL); torture_assert(torture, - ldb=samba_ldb_init(mem_ctx, torture->ev, NULL, NULL, NULL), + ldb != NULL, "Failed to init samba"); torture_assert_int_equal(torture, |