summaryrefslogtreecommitdiffstats
path: root/server/db
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-05-26 10:19:00 -0400
committerSimo Sorce <ssorce@redhat.com>2009-05-26 12:15:14 -0400
commit5eadfd50562c19f3e71ee754cd58173a25420996 (patch)
tree536902e6926e69a7f944afec979742a2186b287f /server/db
parent1eca703ca65ad74673fd20ee97bb8d6e538f0085 (diff)
downloadsssd-5eadfd50562c19f3e71ee754cd58173a25420996.tar.gz
sssd-5eadfd50562c19f3e71ee754cd58173a25420996.tar.xz
sssd-5eadfd50562c19f3e71ee754cd58173a25420996.zip
Silence warnings
Diffstat (limited to 'server/db')
-rw-r--r--server/db/sysdb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/db/sysdb.c b/server/db/sysdb.c
index 1268d9390..7a4731863 100644
--- a/server/db/sysdb.c
+++ b/server/db/sysdb.c
@@ -88,13 +88,12 @@ static int sysdb_attrs_get_el(struct sysdb_attrs *attrs, const char *name,
int sysdb_attrs_add_val(struct sysdb_attrs *attrs,
const char *name, const struct ldb_val *val)
{
- struct ldb_message_element *el;
+ struct ldb_message_element *el = NULL;
struct ldb_val *vals;
int ret;
ret = sysdb_attrs_get_el(attrs, name, &el);
-
vals = talloc_realloc(attrs->a, el->values,
struct ldb_val, el->num_values+1);
if (!vals) return ENOMEM;
@@ -116,7 +115,7 @@ int sysdb_attrs_add_string(struct sysdb_attrs *attrs,
{
struct ldb_val v;
- v.data = (uint8_t *)str;
+ v.data = (uint8_t *)discard_const(str);
v.length = strlen(str);
return sysdb_attrs_add_val(attrs, name, &v);