xsm: fix printf format string for strlen result
authorIan Campbell <ian.campbell@citrix.com>
Tue, 30 Apr 2013 07:08:08 +0000 (09:08 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 30 Apr 2013 07:08:08 +0000 (09:08 +0200)
strlen returns size_t:

policydb.c: In function \91policydb_read\92:
policydb.c:1779: error: format \91%lu\92 expects type \91long unsigned int\92, but argument 3 has type \91size_t\92

This is probably benign on 64-bit x86 but was found by Dharshini on 32-bit Xen
4.2.x. I expect it affects ARM too.

Reported-by: Dharshini Tharmaraj <dharshinitharmaraj@gmail.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
xen/xsm/flask/ss/policydb.c

index fefcd59171bc549db93be0eaeca9db3142a00529..bdec4ac264e73fcb2335a6a3da1208d5f38aec61 100644 (file)
@@ -1737,7 +1737,7 @@ int policydb_read(struct policydb *p, void *fp)
     if ( len != strlen(POLICYDB_STRING) )
     {
         printk(KERN_ERR "Flask:  policydb string length %d does not "
-               "match expected length %lu\n",
+               "match expected length %zu\n",
                len, strlen(POLICYDB_STRING));
         goto bad;
     }