diff options
author | Simon Rettberg | 2017-04-21 16:39:24 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-04-21 16:39:24 +0200 |
commit | 332ff7a104d978a607aae7239c70073c4e88fa22 (patch) | |
tree | 00577e4104916846fcfd1d57c4e5b8be28d30a13 /matchcaseprefix.c | |
parent | scan_asn1length: Allow non-minimally encoded values (diff) | |
download | ldadp-332ff7a104d978a607aae7239c70073c4e88fa22.tar.gz ldadp-332ff7a104d978a607aae7239c70073c4e88fa22.tar.xz ldadp-332ff7a104d978a607aae7239c70073c4e88fa22.zip |
Remove unused string matching helpers
Diffstat (limited to 'matchcaseprefix.c')
-rw-r--r-- | matchcaseprefix.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/matchcaseprefix.c b/matchcaseprefix.c deleted file mode 100644 index 7ba8335..0000000 --- a/matchcaseprefix.c +++ /dev/null @@ -1,20 +0,0 @@ -#include <string.h> -#include "case.h" -#include "ldif.h" -#include "str.h" - -/* behave like strcmp, but also return 0 if s is a prefix of c. */ -int matchcaseprefix(struct string* s,const char* c) { - unsigned int l,l1,i; - if (!c) return -1; - l1=l=str_len(c); - if (s->l<l1) l1=s->l; - i=case_diffb(s->s,l1,c); - if (i) return i; - /* one is a prefix of the other */ - if (l==s->l) return 0; - if (c[l1]) /* is c the longer string? */ - return 0; - return -(int)(s->s[l1]); -} - |