Author: idra Date: 2006-11-26 04:39:17 +0000 (Sun, 26 Nov 2006) New Revision: 19906
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19906 Log: ldb_attr_cmp is used a lot remove unneded overhead of a function call Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_utf8.c branches/SAMBA_4_0/source/lib/ldb/include/ldb.h Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_utf8.c =================================================================== --- branches/SAMBA_4_0/source/lib/ldb/common/ldb_utf8.c 2006-11-26 03:59:01 UTC (rev 19905) +++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_utf8.c 2006-11-26 04:39:17 UTC (rev 19906) @@ -111,17 +111,6 @@ return 1; } -/* - compare two attribute names - attribute names are restricted by rfc2251 so using - strcasecmp and toupper here is ok. - return 0 for match -*/ -int ldb_attr_cmp(const char *attr1, const char *attr2) -{ - return strcasecmp(attr1, attr2); -} - char *ldb_attr_casefold(void *mem_ctx, const char *s) { int i; Modified: branches/SAMBA_4_0/source/lib/ldb/include/ldb.h =================================================================== --- branches/SAMBA_4_0/source/lib/ldb/include/ldb.h 2006-11-26 03:59:01 UTC (rev 19905) +++ branches/SAMBA_4_0/source/lib/ldb/include/ldb.h 2006-11-26 04:39:17 UTC (rev 19906) @@ -1320,8 +1320,12 @@ \return 0 if the attribute names are the same, or only differ in case; non-zero if there are any differences + + attribute names are restricted by rfc2251 so using + strcasecmp and toupper here is ok. + return 0 for match */ -int ldb_attr_cmp(const char *attr1, const char *attr2); +#define ldb_attr_cmp(a, b) strcasecmp(a, b) char *ldb_attr_casefold(void *mem_ctx, const char *s); int ldb_attr_dn(const char *attr);