From e7db1806af37fa00071633931b64f424abbe8cba Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Tue, 20 Nov 2018 11:51:35 +0000 Subject: [PATCH] util: drop unused strchr() wrapper Suggested-by: Emil Velikov Signed-off-by: Eric Engestrom Reviewed-by: Eric Anholt --- src/util/u_debug.c | 2 +- src/util/u_string.h | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/util/u_debug.c b/src/util/u_debug.c index f6ed0138c1f..ab3c8eb316d 100644 --- a/src/util/u_debug.c +++ b/src/util/u_debug.c @@ -55,7 +55,7 @@ _debug_vprintf(const char *format, va_list ap) /* We buffer until we find a newline. */ size_t len = strlen(buf); int ret = util_vsnprintf(buf + len, sizeof(buf) - len, format, ap); - if (ret > (int)(sizeof(buf) - len - 1) || util_strchr(buf + len, '\n')) { + if (ret > (int)(sizeof(buf) - len - 1) || strchr(buf + len, '\n')) { os_log_message(buf); buf[0] = '\0'; } diff --git a/src/util/u_string.h b/src/util/u_string.h index 742f5079fb6..6e762fbdc17 100644 --- a/src/util/u_string.h +++ b/src/util/u_string.h @@ -134,14 +134,6 @@ util_vasprintf(char **ret, const char *format, va_list ap) return util_vsnprintf(*ret, r + 1, format, ap); } -static inline char * -util_strchr(const char *s, char c) -{ - char *p = util_strchrnul(s, c); - - return *p ? p : NULL; -} - static inline char* util_strncat(char *dst, const char *src, size_t n) { @@ -200,7 +192,6 @@ util_strncmp(const char *s1, const char *s2, size_t n) #define util_vsprintf vsprintf #define util_vasprintf vasprintf #define util_sprintf sprintf -#define util_strchr strchr #define util_strcmp strcmp #define util_strncmp strncmp #define util_strncat strncat -- 2.30.2