commit - 281a8852b3a2d76c10d2fb6476a706746d05509b
commit + 58fae4ea901aed6b093c5a336eb09abe6efe5880
blob - 872846a64191401c1144a9f1abc883361512ecb3
blob + 4ebf63bcb52f0d524c4913957d4516fdfe807221
--- logger.c
+++ logger.c
va_start(ap, fmt);
vlog(LOG_DEBUG, c, fmt, ap);
va_end(ap);
-}
-
-/* strchr, but with a bound */
-static char *
-gmid_strnchr(char *s, int c, size_t len)
-{
- size_t i;
-
- for (i = 0; i < len; ++i)
- if (s[i] == c)
- return &s[i];
- return NULL;
}
void
strlcpy(b, t, sizeof(b));
}
- if ((t = gmid_strnchr(meta, '\r', l)) == NULL)
+ if ((t = memchr(meta, '\r', l)) == NULL)
t = meta + len;
ec = asprintf(&fmted, "%s:%s GET %s %.*s", hbuf, sbuf, b,