From: Andrew Morton Date: Fri, 29 Apr 2005 14:59:11 +0000 (+0100) Subject: audit_log_untrustedstring() warning fix X-Git-Tag: v2.6.12-rc4~149 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81b7854d52d35ed2353dd47033ae630d18322a2d;p=linux-2.6 audit_log_untrustedstring() warning fix kernel/audit.c: In function `audit_log_untrustedstring': kernel/audit.c:736: warning: comparison is always false due to limited range of data type Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse --- diff --git a/kernel/audit.c b/kernel/audit.c index dca7b99615..e7bff8000d 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -730,7 +730,7 @@ void audit_log_hex(struct audit_buffer *ab, const unsigned char *buf, size_t len void audit_log_untrustedstring(struct audit_buffer *ab, const char *string) { - const char *p = string; + const unsigned char *p = string; while (*p) { if (*p == '"' || *p == ' ' || *p < 0x20 || *p > 0x7f) {