1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r19906: ldb_attr_cmp is used a lot

remove unneded overhead of a function call
(This used to be commit 3ca2586762)
This commit is contained in:
Simo Sorce 2006-11-26 04:39:17 +00:00 committed by Gerald (Jerry) Carter
parent baa8ed2015
commit 4f8b4a8ef1
2 changed files with 5 additions and 12 deletions

View File

@ -111,17 +111,6 @@ int ldb_valid_attr_name(const char *s)
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;

View File

@ -1320,8 +1320,12 @@ int ldb_dn_cmp(struct ldb_context *ldb, const char *dn1, const char *dn2);
\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);