From: James Carter <jwcart2@gmail.com>
To: selinux@vger.kernel.org
Cc: stephen.smalley.work@gmail.com, James Carter <jwcart2@gmail.com>
Subject: [PATCH] libsepol: Use matching integer types in scope_write()
Date: Tue, 18 Aug 2026 15:48:27 -0400 [thread overview]
Message-ID: <20260818194827.64744-1-jwcart2@gmail.com> (raw)
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 <jwcart2@gmail.com>
---
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
next reply other threads:[~2026-08-18 19:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 19:48 James Carter [this message]
2026-08-19 12:54 ` [PATCH] libsepol: Use matching integer types in scope_write() Stephen Smalley
2026-08-19 16:41 ` James Carter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260818194827.64744-1-jwcart2@gmail.com \
--to=jwcart2@gmail.com \
--cc=selinux@vger.kernel.org \
--cc=stephen.smalley.work@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.