diff options
author | Simo Sorce <idra@samba.org> | 2006-11-26 04:39:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:28:34 -0500 |
commit | 4f8b4a8ef19da2bcbeea1ae79e9ebbdb8de08169 (patch) | |
tree | 5b2917d70c9f235bfdbf5bcdbcd0a8e28c17ce50 | |
parent | baa8ed20153883ba2c5cfb5211cd1255b38b6a20 (diff) | |
download | samba-4f8b4a8ef19da2bcbeea1ae79e9ebbdb8de08169.tar.gz samba-4f8b4a8ef19da2bcbeea1ae79e9ebbdb8de08169.tar.bz2 samba-4f8b4a8ef19da2bcbeea1ae79e9ebbdb8de08169.zip |
r19906: ldb_attr_cmp is used a lot
remove unneded overhead of a function call
(This used to be commit 3ca25867621af049c6cc52e919fa46dd26c31918)
-rw-r--r-- | source4/lib/ldb/common/ldb_utf8.c | 11 | ||||
-rw-r--r-- | source4/lib/ldb/include/ldb.h | 6 |
2 files changed, 5 insertions, 12 deletions
diff --git a/source4/lib/ldb/common/ldb_utf8.c b/source4/lib/ldb/common/ldb_utf8.c index 86ed40535a..99043ae2af 100644 --- a/source4/lib/ldb/common/ldb_utf8.c +++ b/source4/lib/ldb/common/ldb_utf8.c @@ -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; diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h index c44c1d6ee7..9d48810078 100644 --- a/source4/lib/ldb/include/ldb.h +++ b/source4/lib/ldb/include/ldb.h @@ -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); |