/* 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';
}
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)
{
#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