From 00fdedd30239df93d0ac88bd6600df8c275130ac Mon Sep 17 00:00:00 2001 From: Thomas Jensen Date: Sat, 28 Sep 2024 14:49:01 +0200 Subject: [PATCH] Remove unused function array_contains() from 'tools' module --- src/tools.c | 16 ---------------- src/tools.h | 3 --- 2 files changed, 19 deletions(-) diff --git a/src/tools.c b/src/tools.c index 92d4f87..2960f62 100644 --- a/src/tools.c +++ b/src/tools.c @@ -596,22 +596,6 @@ void analyze_line_ascii(input_t *input_ptr, line_t *line) -int array_contains(char **array, const size_t array_len, const char *s) -{ - int result = 0; - if (array != NULL && array_len > 0) { - for (size_t i = 0; i < array_len; ++i) { - if (strcmp(array[i], s) == 0) { - result = 1; - break; - } - } - } - return result; -} - - - int array_contains0(char **array, const char *s) { int result = 0; diff --git a/src/tools.h b/src/tools.h index 3acca0b..7952778 100644 --- a/src/tools.h +++ b/src/tools.h @@ -166,9 +166,6 @@ size_t count_invisible_chars(const uint32_t *s, size_t *num_esc, char **ascii, s int is_csi_reset(const uint32_t *csi); -int array_contains(char **array, const size_t array_len, const char *s); - - /** * Determine if the given `array` contains the given string (case-insensitive!). * @param array an array of strings to search