From bbbb1adae92d53840ef28ec955a388d2d2bf7c0a Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 29 Jan 2009 17:32:08 +0100 Subject: Fix signed/unsigned integer comparison for helpers --- common/textfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/textfile.c') diff --git a/common/textfile.c b/common/textfile.c index d1df7ef1..eaf77568 100644 --- a/common/textfile.c +++ b/common/textfile.c @@ -213,7 +213,7 @@ static int write_key(const char *pathname, const char *key, const char *value, i goto unmap; } - if (value && (strlen(value) == end - off - len - 1) && + if (value && ((ssize_t) strlen(value) == end - off - len - 1) && !strncmp(off + len + 1, value, end - off - len - 1)) goto unmap; -- cgit