From 9ea56848c25cf3cb8b1347ba5a5bd245f7b6da48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 7 Dec 2022 13:39:15 +0100 Subject: [PATCH] garray: Just use one bit to hold the null teminated state This is probably ignored for saving space because of padding optimizations, but since we want this value to be either 0 or 1, this enforces this too. --- glib/garray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/garray.c b/glib/garray.c index 4419c62e1..82b17503a 100644 --- a/glib/garray.c +++ b/glib/garray.c @@ -1072,7 +1072,7 @@ struct _GRealPtrArray guint len; guint alloc; gatomicrefcount ref_count; - guint8 null_terminated; /* always either 0 or 1, so it can be added to array lengths */ + guint8 null_terminated : 1; /* always either 0 or 1, so it can be added to array lengths */ GDestroyNotify element_free_func; };