lib/ldb fix compiler warnings
authorChristian Ambach <ambi@samba.org>
Tue, 10 Dec 2013 16:45:58 +0000 (17:45 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 12 Dec 2013 22:21:27 +0000 (14:21 -0800)
about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/ldb/common/ldb_dn.c

index 14596f6c3711f5a643f1b485e40cfec0076fedab..6b6f90c13ea00914315fac90906eb888352372d7 100644 (file)
@@ -287,7 +287,7 @@ char *ldb_dn_escape_value(TALLOC_CTX *mem_ctx, struct ldb_val value)
 */
 static bool ldb_dn_explode(struct ldb_dn *dn)
 {
-       char *p, *ex_name, *ex_value, *data, *d, *dt, *t;
+       char *p, *ex_name = NULL, *ex_value = NULL, *data, *d, *dt, *t;
        bool trim = true;
        bool in_extended = true;
        bool in_ex_name = false;
@@ -298,7 +298,7 @@ static bool ldb_dn_explode(struct ldb_dn *dn)
        bool is_oid = false;
        bool escape = false;
        unsigned int x;
-       size_t l;
+       size_t l = 0;
        int ret;
        char *parse_dn;
        bool is_index;