[PATCH] libsepol: Use matching integer types in scope_write()
James Carter <[email protected]>
| Newsgroups | org.kernel.vger.selinux |
|---|---|
| Message-ID | <[email protected]> |
Since the variable "items" is used where a size_t is expected, just make it a size_t. Since the variable "i" is compared to an uint32_t, just make it a uint32_t. Signed-off-by: James Carter <[email protected]> --- libsepol/src/write.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libsepol/src/write.c b/libsepol/src/write.c index 4bb39f99..a0c9af85 100644 --- a/libsepol/src/write.c +++ b/libsepol/src/write.c @@ -1947,7 +1947,8 @@ static int scope_write(hashtab_key_t key, hashtab_datum_t datum, void *ptr) struct policy_file *fp = pd->fp; uint32_t static_buf[32], *dyn_buf = NULL, *buf; size_t key_len = strlen(key); - unsigned int items = 2 + scope->decl_ids_len, i; + size_t items = 2 + scope->decl_ids_len; + uint32_t i; int rc; buf = static_buf; -- 2.55.0