svn commit: samba r8146 - in
branches/SAMBA_4_0/source/lib/ldb/common: .
metze at samba.org
metze at samba.org
Mon Jul 4 15:06:06 GMT 2005
Author: metze
Date: 2005-07-04 15:06:05 +0000 (Mon, 04 Jul 2005)
New Revision: 8146
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8146
Log:
fix compiler warning
metze
Modified:
branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c 2005-07-04 13:57:54 UTC (rev 8145)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c 2005-07-04 15:06:05 UTC (rev 8146)
@@ -361,22 +361,20 @@
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);
More information about the samba-cvs
mailing list