lockd: Eliminate harmless mixed sign comparison in nlmdbg_cookie2a()
authorChuck Lever <chuck.lever@oracle.com>
Thu, 20 Dec 2007 19:55:11 +0000 (14:55 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 30 Jan 2008 07:06:02 +0000 (02:06 -0500)
The cookie->len field is unsigned, so the loop index variable in
nlmdbg_cookie2a() should also be unsigned.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/lockd/xdr.c

index 633653bff9440632417dc8aaba3491e62265416c..3e459e18cc31ba2efeaca67dc9b40ae506604247 100644 (file)
@@ -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 */