1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00

r8146: fix compiler warning

metze
(This used to be commit 5fcaa21d67)
This commit is contained in:
Stefan Metzmacher 2005-07-04 15:06:05 +00:00 committed by Gerald (Jerry) Carter
parent 637ba7f7e6
commit 8f9e87d858

View File

@ -361,22 +361,20 @@ failed:
char *ldb_dn_linearize(void *mem_ctx, const struct ldb_dn *edn)
{
char *dn, *value;
const char *format = "%s=%s";
int i;
dn = talloc_strdup(mem_ctx, "");
LDB_DN_NULL_FAILED(dn);
for (i = 0; i < edn->comp_num; i++) {
if (i != 0) {
format = ",%s=%s";
}
value = ldb_dn_escape_value(dn, edn->components[i].value);
LDB_DN_NULL_FAILED(value);
dn = talloc_asprintf_append(dn, format, edn->components[i].name, value);
if (i == 0) {
dn = talloc_asprintf_append(dn, "%s=%s", edn->components[i].name, value);
} else {
dn = talloc_asprintf_append(dn, ",%s=%s", edn->components[i].name, value);
}
LDB_DN_NULL_FAILED(dn);
talloc_free(value);