diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-01-09 08:46:40 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-01-09 08:46:40 -0500 |
commit | f9a7701ff1228b7f1c58b4a2c9716b705cb0d126 (patch) | |
tree | ce2c364e7d4918bd6e14ddc83bfd98d34fd1b266 /src/lib | |
parent | ae578981b6c43fbf9e13d0e74806ca6153edf7a9 (diff) | |
parent | 29254812a3428da4ffeaede5d211364d942f94ab (diff) | |
download | tor-f9a7701ff1228b7f1c58b4a2c9716b705cb0d126.tar.gz tor-f9a7701ff1228b7f1c58b4a2c9716b705cb0d126.zip |
Merge branch 'ticket28856_v2'
Diffstat (limited to 'src/lib')
-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); |