Re: [PATCH 1/3] add strnncmp() function

2014-06-16 Thread Jonathan Nieder
Jeremiah Mahler wrote: > Add a strnncmp() function which behaves like strncmp() except it uses > the length of both strings instead of just one. The above description isn't very clear to me. Problems: - strncmp compares prefixes of \0-terminated strings. This function compares two binary b

[PATCH 1/3] add strnncmp() function

2014-06-16 Thread Jeremiah Mahler
Add a strnncmp() function which behaves like strncmp() except it uses the length of both strings instead of just one. Signed-off-by: Jeremiah Mahler --- strbuf.c | 6 ++ strbuf.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/strbuf.c b/strbuf.c index ac62982..bd486c3 100644 --- a/st