]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
unistr: kill dead code
authorBaptiste Daroussin <bapt@FreeBSD.org>
Fri, 14 Apr 2023 08:59:27 +0000 (10:59 +0200)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Fri, 14 Apr 2023 09:00:35 +0000 (11:00 +0200)
include/unistr.h
src/unistr.c

index c1811b65816cbaadc31793c77edb38db83168ade..05fc20e651fe9672468a4bc825078bf6505cdd74 100644 (file)
@@ -34,7 +34,6 @@ typedef struct _unistr {
 
 unistr *unistr_new(void);
 void unistr_free(unistr *str);
-int unistr_cmp(const unistr *str1, const unistr *str2);
 unistr *unistr_dup(const unistr *str);
 void unistr_append_char(unistr *str, unistr_char uc);
 void unistr_append_usascii(unistr *str, const char *binary, size_t bin_len);
index d520bb3c954e28f56911c2e20d50a63348a22257..1c1811f199ed62647f017fab280c8e25a3fd109d 100644 (file)
@@ -63,24 +63,6 @@ void unistr_free(unistr *str)
 }
 
 
-int unistr_cmp(const unistr *str1, const unistr *str2)
-{
-       unsigned int i;
-
-       for (i=0; i<str1->len; i++) {
-               if (str1->chars[i] < str2->chars[i]) {
-                       return -1;
-               } else if (str1->chars[i] > str2->chars[i]) {
-                       return 1;
-               }
-       }
-       if (str2->len > str1->len) {
-               return 1;
-       }
-       return 0;
-}
-
-
 unistr *unistr_dup(const unistr *str)
 {
        unistr *ret;