svn commit: samba r19688 - in
branches/SAMBA_3_0/source/lib/ldb/modules: .
vlendec at samba.org
vlendec at samba.org
Mon Nov 13 10:43:13 GMT 2006
Author: vlendec
Date: 2006-11-13 10:43:12 +0000 (Mon, 13 Nov 2006)
New Revision: 19688
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19688
Log:
Fix a deadcode warning by Coverity.
Simo, I'm not sure this is the correct fix. So I'd like you to look at it and
merge to 4 if appropriate.
Volker
Modified:
branches/SAMBA_3_0/source/lib/ldb/modules/schema.c
Changeset:
Modified: branches/SAMBA_3_0/source/lib/ldb/modules/schema.c
===================================================================
--- branches/SAMBA_3_0/source/lib/ldb/modules/schema.c 2006-11-13 10:34:59 UTC (rev 19687)
+++ branches/SAMBA_3_0/source/lib/ldb/modules/schema.c 2006-11-13 10:43:12 UTC (rev 19688)
@@ -201,12 +201,7 @@
}
ret = ldb_search(module->ldb, NULL, LDB_SCOPE_SUBTREE, filter, NULL, &srch);
- if (ret != 1) {
- return ret;
- }
- talloc_steal(schema_struct, srch);
-
- if (ret <= 0) {
+ if (ret != LDB_SUCCESS) {
/* Schema DB Error: Error occurred retrieving
Object Class Description */
ldb_debug_set(module->ldb, LDB_DEBUG_ERROR,
@@ -214,7 +209,10 @@
schema_struct->objectclasses.attr[i].name);
return -1;
}
- if (ret > 1) {
+
+ talloc_steal(schema_struct, srch);
+
+ if (srch->count > 1) {
/* Schema DB Error: Too Many Records */
ldb_debug_set(module->ldb, LDB_DEBUG_ERROR,
"Too many records found retrieving Objectclass %s.\n",
More information about the samba-cvs
mailing list