From d15df6b08b729882740e78eb24d186bbf2e1cf3e Mon Sep 17 00:00:00 2001 From: "peter03192003@gmail.com" Date: Tue, 5 Apr 2016 11:01:13 -0700 Subject: [PATCH] inmates: lib: fix strncmp We only tested the first character of the strings so far. Make sure to advance the pointers correctly. Signed-off-by: ShengYen Peng Signed-off-by: Jan Kiszka --- inmates/lib/string.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inmates/lib/string.c b/inmates/lib/string.c index a6a3874..7816140 100644 --- a/inmates/lib/string.c +++ b/inmates/lib/string.c @@ -41,6 +41,8 @@ int strncmp(const char *s1, const char *s2, unsigned long n) return diff; if (*s1 == 0) break; + s1++; + s2++; } return 0; } -- 2.39.2