From fe77bcf40500c3002f58bffbe33879e3f7fedeec Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Fri, 14 Apr 2023 10:59:27 +0200 Subject: [PATCH] unistr: kill dead code --- include/unistr.h | 1 - src/unistr.c | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/include/unistr.h b/include/unistr.h index c1811b65..05fc20e6 100644 --- a/include/unistr.h +++ b/include/unistr.h @@ -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); diff --git a/src/unistr.c b/src/unistr.c index d520bb3c..1c1811f1 100644 --- a/src/unistr.c +++ b/src/unistr.c @@ -63,24 +63,6 @@ void unistr_free(unistr *str) } -int unistr_cmp(const unistr *str1, const unistr *str2) -{ - unsigned int i; - - for (i=0; ilen; 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; -- 2.47.2