* [PATCH] libsepol: Use matching integer types in scope_write()
@ 2026-08-18 19:48 James Carter
2026-08-19 12:54 ` Stephen Smalley
0 siblings, 1 reply; 3+ messages in thread
From: James Carter @ 2026-08-18 19:48 UTC (permalink / raw)
To: selinux; +Cc: stephen.smalley.work, James Carter
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] libsepol: Use matching integer types in scope_write()
2026-08-18 19:48 [PATCH] libsepol: Use matching integer types in scope_write() James Carter
@ 2026-08-19 12:54 ` Stephen Smalley
2026-08-19 16:41 ` James Carter
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Smalley @ 2026-08-19 12:54 UTC (permalink / raw)
To: James Carter; +Cc: selinux
On Tue, Aug 18, 2026 at 3:48 PM James Carter <jwcart2@gmail.com> wrote:
>
> 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>
Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] libsepol: Use matching integer types in scope_write()
2026-08-19 12:54 ` Stephen Smalley
@ 2026-08-19 16:41 ` James Carter
0 siblings, 0 replies; 3+ messages in thread
From: James Carter @ 2026-08-19 16:41 UTC (permalink / raw)
To: Stephen Smalley; +Cc: selinux
On Wed, Aug 19, 2026 at 8:55 AM Stephen Smalley
<stephen.smalley.work@gmail.com> wrote:
>
> On Tue, Aug 18, 2026 at 3:48 PM James Carter <jwcart2@gmail.com> wrote:
> >
> > 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>
>
> Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Merged.
Thanks,
Jim
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-19 16:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18 19:48 [PATCH] libsepol: Use matching integer types in scope_write() James Carter
2026-08-19 12:54 ` Stephen Smalley
2026-08-19 16:41 ` James Carter
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.