summaryrefslogtreecommitdiffstats
path: root/matchstring.c
diff options
context:
space:
mode:
authorSimon Rettberg2017-04-21 16:39:24 +0200
committerSimon Rettberg2017-04-21 16:39:24 +0200
commit332ff7a104d978a607aae7239c70073c4e88fa22 (patch)
tree00577e4104916846fcfd1d57c4e5b8be28d30a13 /matchstring.c
parentscan_asn1length: Allow non-minimally encoded values (diff)
downloadldadp-332ff7a104d978a607aae7239c70073c4e88fa22.tar.gz
ldadp-332ff7a104d978a607aae7239c70073c4e88fa22.tar.xz
ldadp-332ff7a104d978a607aae7239c70073c4e88fa22.zip
Remove unused string matching helpers
Diffstat (limited to 'matchstring.c')
-rw-r--r--matchstring.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/matchstring.c b/matchstring.c
deleted file mode 100644
index fdae726..0000000
--- a/matchstring.c
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "byte.h"
-#include "bstr.h"
-#include "ldif.h"
-
-/* behave like strcmp */
-int matchstring(struct string* s,const char* c) {
- unsigned int l,l1,i;
- if (!c) return -1;
- l1=l=bstrlen(c);
- if (s->l<l1) l1=s->l;
- c=bstrfirst(c);
- i=byte_diff(s->s,l1,c);
- if (i) return i;
- /* same length? */
- if (l==s->l) return 0;
- /* one is a prefix of the other */
- if (l1<l) /* we cut off c */
- return -c[l1];
- return (int)(s->s[l1]);
-}
-