From: Chuck Lever Date: Thu, 20 Dec 2007 19:55:11 +0000 (-0500) Subject: lockd: Eliminate harmless mixed sign comparison in nlmdbg_cookie2a() X-Git-Tag: firefly_0821_release~23639^2~23 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cab6fc1b77c3ec4471d7d54ff6db9ad2dd59c2f5;p=firefly-linux-kernel-4.4.55.git lockd: Eliminate harmless mixed sign comparison in nlmdbg_cookie2a() The cookie->len field is unsigned, so the loop index variable in nlmdbg_cookie2a() should also be unsigned. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust --- diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c index 633653bff944..3e459e18cc31 100644 --- a/fs/lockd/xdr.c +++ b/fs/lockd/xdr.c @@ -612,8 +612,7 @@ const char *nlmdbg_cookie2a(const struct nlm_cookie *cookie) * called with BKL held. */ static char buf[2*NLM_MAXCOOKIELEN+1]; - int i; - int len = sizeof(buf); + unsigned int i, len = sizeof(buf); char *p = buf; len--; /* allow for trailing \0 */