diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-12-17 09:04:25 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-12-17 09:04:25 -0500 |
commit | 29254812a3428da4ffeaede5d211364d942f94ab (patch) | |
tree | 21c56c997dadd50b4852c868bc15d488082120b1 /src/lib/string | |
parent | a0fad3981e9d072188c6ba19f25bdd78962330d8 (diff) | |
download | tor-29254812a3428da4ffeaede5d211364d942f94ab.tar.gz tor-29254812a3428da4ffeaede5d211364d942f94ab.zip |
Remove strcmp_len(): it is now unused
(See 28856.)
Diffstat (limited to 'src/lib/string')
-rw-r--r-- | src/lib/string/util_string.c | 15 | ||||
-rw-r--r-- | src/lib/string/util_string.h | 1 |
2 files changed, 0 insertions, 16 deletions
diff --git a/src/lib/string/util_string.c b/src/lib/string/util_string.c index e76e73046f..36e19d029c 100644 --- a/src/lib/string/util_string.c +++ b/src/lib/string/util_string.c @@ -212,21 +212,6 @@ strcmpstart(const char *s1, const char *s2) return strncmp(s1, s2, n); } -/** Compare the s1_len-byte string <b>s1</b> with <b>s2</b>, - * without depending on a terminating nul in s1. Sorting order is first by - * length, then lexically; return values are as for strcmp. - */ -int -strcmp_len(const char *s1, const char *s2, size_t s1_len) -{ - size_t s2_len = strlen(s2); - if (s1_len < s2_len) - return -1; - if (s1_len > s2_len) - return 1; - return fast_memcmp(s1, s2, s2_len); -} - /** Compares the first strlen(s2) characters of s1 with s2. Returns as for * strcasecmp. */ diff --git a/src/lib/string/util_string.h b/src/lib/string/util_string.h index 99467a27c3..6541afa4cb 100644 --- a/src/lib/string/util_string.h +++ b/src/lib/string/util_string.h @@ -33,7 +33,6 @@ int tor_strisnonupper(const char *s); int tor_strisspace(const char *s); int strcmp_opt(const char *s1, const char *s2); int strcmpstart(const char *s1, const char *s2); -int strcmp_len(const char *s1, const char *s2, size_t len); int strcasecmpstart(const char *s1, const char *s2); int strcmpend(const char *s1, const char *s2); int strcasecmpend(const char *s1, const char *s2); |