summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r--source4/lib/ldb/common/ldb_dn.c9
-rw-r--r--source4/lib/ldb/common/ldb_msg.c2
2 files changed, 6 insertions, 5 deletions
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c
index 92e06025d5..b497de142b 100644
--- a/source4/lib/ldb/common/ldb_dn.c
+++ b/source4/lib/ldb/common/ldb_dn.c
@@ -127,7 +127,7 @@ static struct ldb_val ldb_dn_unescape_value(void *mem_ctx, const char *src)
unsigned x;
char *p, *dst = NULL, *end;
- value.length = 0;
+ memset(&value, 0, sizeof(value));
LDB_DN_NULL_FAILED(src);
@@ -276,8 +276,9 @@ static struct ldb_dn_component ldb_dn_explode_component(void *mem_ctx, char *raw
char *p;
int ret, qs, qe;
+ memset(&dc, 0, sizeof(dc));
+
if (raw_component == NULL) {
- dc.name = NULL;
return dc;
}
@@ -618,8 +619,8 @@ char *ldb_dn_linearize_casefold(struct ldb_context *ldb, const struct ldb_dn *ed
static struct ldb_dn_component ldb_dn_copy_component(void *mem_ctx, struct ldb_dn_component *src)
{
struct ldb_dn_component dst;
-
- dst.name = NULL;
+
+ memset(&dst, 0, sizeof(dst));
if (src == NULL) {
return dst;
diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c
index a72a4616fb..977f68144b 100644
--- a/source4/lib/ldb/common/ldb_msg.c
+++ b/source4/lib/ldb/common/ldb_msg.c
@@ -646,7 +646,7 @@ time_t ldb_string_to_time(const char *s)
if (s == NULL) return 0;
- ZERO_STRUCT(tm);
+ memset(&tm, 0, sizeof(tm));
if (sscanf(s, "%04u%02u%02u%02u%02u%02u",
&tm.tm_year, &tm.tm_mon, &tm.tm_mday,
&tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) {