summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2018-11-20 11:51:35 +0000
committerEric Engestrom <[email protected]>2019-07-19 22:39:38 +0100
commite7db1806af37fa00071633931b64f424abbe8cba (patch)
tree8e082cfbc426e7e216fc3848f58606a666bbebfa
parent84e85035cff0692c281dd13f18649560efee59f9 (diff)
util: drop unused strchr() wrapper
Suggested-by: Emil Velikov <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r--src/util/u_debug.c2
-rw-r--r--src/util/u_string.h9
2 files changed, 1 insertions, 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