summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb_utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/common/ldb_utf8.c')
-rw-r--r--source4/lib/ldb/common/ldb_utf8.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/source4/lib/ldb/common/ldb_utf8.c b/source4/lib/ldb/common/ldb_utf8.c
index 743e976e84..1951e6edca 100644
--- a/source4/lib/ldb/common/ldb_utf8.c
+++ b/source4/lib/ldb/common/ldb_utf8.c
@@ -42,13 +42,10 @@
*/
void ldb_set_utf8_fns(struct ldb_context *ldb,
void *context,
- int (*cmp)(void *, const char *, const char *),
char *(*casefold)(void *, void *, const char *))
{
if (context)
ldb->utf8_fns.context = context;
- if (cmp)
- ldb->utf8_fns.caseless_cmp = cmp;
if (casefold)
ldb->utf8_fns.casefold = casefold;
}
@@ -71,19 +68,9 @@ char *ldb_casefold_default(void *context, void *mem_ctx, const char *s)
return ret;
}
-/*
- a caseless compare, optimised for 7 bit
- NOTE: doesn't handle UTF8
-*/
-
-int ldb_caseless_cmp_default(void *context, const char *s1, const char *s2)
-{
- return strcasecmp(s1,s2);
-}
-
void ldb_set_utf8_default(struct ldb_context *ldb)
{
- ldb_set_utf8_fns(ldb, NULL, ldb_caseless_cmp_default, ldb_casefold_default);
+ ldb_set_utf8_fns(ldb, NULL, ldb_casefold_default);
}
char *ldb_casefold(struct ldb_context *ldb, void *mem_ctx, const char *s)
@@ -91,11 +78,6 @@ char *ldb_casefold(struct ldb_context *ldb, void *mem_ctx, const char *s)
return ldb->utf8_fns.casefold(ldb->utf8_fns.context, mem_ctx, s);
}
-int ldb_caseless_cmp(struct ldb_context *ldb, const char *s1, const char *s2)
-{
- return ldb->utf8_fns.caseless_cmp(ldb->utf8_fns.context, s1, s2);
-}
-
/*
check the attribute name is valid according to rfc2251
returns 1 if the name is ok