From 31d537e314ea0737b69010389a72a5ad842fe061 Mon Sep 17 00:00:00 2001 From: Denis Orlov Date: Thu, 16 Mar 2023 10:36:50 +0300 Subject: lib: string: remove duplicated function We have two functions that are doing the same thing: 'strncasecmp' and 'strnicmp'. The only difference between them is that the latter is correctly handling the len argument of 0. So rename it into the former one ('strncasecmp', as it is the POSIX name for this function), deleting the other implementation. As no one is actually using 'strnicmp', no other code requires any fixes. This change is effectively forwarded from the Linux commits 'lib/string.c: remove duplicated function' (hash cd514e727b18ff4d189b8e268db13729a4175091) and 'lib/string.c: remove strnicmp()' (hash af3cd13501eb04ca61d017ff4406f1cbffafdc04). Signed-off-by: Denis Orlov Link: https://lore.barebox.org/20230316073650.4170874-1-denorl2009@gmail.com Signed-off-by: Sascha Hauer --- include/linux/string.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/linux/string.h b/include/linux/string.h index 0c79d3e5cf..cd81ab1396 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -58,9 +58,6 @@ extern int strcmp(const char *,const char *); #ifndef __HAVE_ARCH_STRNCMP extern int strncmp(const char *,const char *,__kernel_size_t); #endif -#ifndef __HAVE_ARCH_STRNICMP -extern int strnicmp(const char *, const char *, __kernel_size_t); -#endif #ifndef __HAVE_ARCH_STRCASECMP extern int strcasecmp(const char *s1, const char *s2); #endif -- cgit v1.2.1