SELinux: security_read_policy should take a size_t not ssize_t
authorEric Paris <eparis@redhat.com>
Wed, 20 Apr 2011 14:21:28 +0000 (10:21 -0400)
committerEric Paris <eparis@redhat.com>
Mon, 25 Apr 2011 14:19:02 +0000 (10:19 -0400)
The len should be an size_t but is a ssize_t.  Easy enough fix to silence
build warnings.  We have no need for signed-ness.

Signed-off-by: Eric Paris <eparis@redhat.com>
Reviewed-by: James Morris <jmorris@namei.org>
security/selinux/include/security.h
security/selinux/ss/services.c

index 2cf6708641474e57b482258cd5abdf2a2bd7b10e..3ba4feba048a0158230620b83ca91d29c2e8ff26 100644 (file)
@@ -86,7 +86,7 @@ extern int selinux_policycap_openperm;
 int security_mls_enabled(void);
 
 int security_load_policy(void *data, size_t len);
-int security_read_policy(void **data, ssize_t *len);
+int security_read_policy(void **data, size_t *len);
 size_t security_policydb_len(void);
 
 int security_policycap_supported(unsigned int req_cap);
index f3f5dca810069e757d4e89ca54e37bf9d0960883..211c0ada594c114f6c7b19ab59d9bbe7054f64f9 100644 (file)
@@ -3189,7 +3189,7 @@ out:
  * @len: length of data in bytes
  *
  */
-int security_read_policy(void **data, ssize_t *len)
+int security_read_policy(void **data, size_t *len)
 {
        int rc;
        struct policy_file fp;