lib/ldb fix compiler warnings
authorChristian Ambach <ambi@samba.org>
Tue, 10 Dec 2013 16:46:30 +0000 (17:46 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 15 Jul 2014 10:46:13 +0000 (12:46 +0200)
about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 35b4ba0193d783d85283b07f520f0af8dc2c1260)

lib/ldb/ldb_map/ldb_map_inbound.c

index 06d52aa1d6374f1c64096ce26ac8a36a9bbf70e4..461e68113ab20a9b0ee73ee0158abb45577111ad 100644 (file)
@@ -476,7 +476,7 @@ static int map_add_do_local(struct map_context *ac)
 int ldb_map_modify(struct ldb_module *module, struct ldb_request *req)
 {
        const struct ldb_message *msg = req->op.mod.message;
-       struct ldb_request *search_req;
+       struct ldb_request *search_req = NULL;
        struct ldb_message *remote_msg;
        struct ldb_context *ldb;
        struct map_context *ac;
@@ -699,7 +699,7 @@ static int map_delete_do_local(struct map_context *ac)
 /* Rename a record. */
 int ldb_map_rename(struct ldb_module *module, struct ldb_request *req)
 {
-       struct ldb_request *search_req;
+       struct ldb_request *search_req = NULL;
        struct ldb_context *ldb;
        struct map_context *ac;
        int ret;