diff options
-rw-r--r-- | src/core/line-split.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/core/line-split.c b/src/core/line-split.c index b100a20f..a93ce8e8 100644 --- a/src/core/line-split.c +++ b/src/core/line-split.c @@ -53,12 +53,7 @@ static void linebuf_append(LINEBUF_REC *rec, const char *data, int len) static char *linebuf_find(LINEBUF_REC *rec, char chr) { - int n; - - for (n = 0; n < rec->len; n++) - if (rec->str[n] == chr) return rec->str+n; - - return NULL; + return memchr(rec->str, chr, rec->len); } static int remove_newline(LINEBUF_REC *rec) |