]> Kevux Git Server - controller/commitdiff
Update: Avoid the use of bool, keeping it to a bare minimum.
authorKevin Day <Kevin@kevux.org>
Mon, 1 Dec 2025 01:42:18 +0000 (19:42 -0600)
committerKevin Day <Kevin@kevux.org>
Mon, 1 Dec 2025 01:42:18 +0000 (19:42 -0600)
Use `uint8_t` to both enforce a specific byte size as well as provide the ability for it to be converted into a set of bits if need be, without breaking API or ABI.

sources/c/program/controller/main/common/type/interrupt.h
sources/c/program/controller/main/print/output/entry/setting.c
sources/c/program/controller/main/print/output/rule/validate.c

index 7e4454b214310ea2a0ccbca279d51206f2c8086a..425d9146ba2e5079b01ed535cde69201ddfcbb02 100644 (file)
@@ -25,7 +25,7 @@ extern "C" {
  */
 #ifndef _di_controller_interrupt_t_
   typedef struct {
-    bool is_normal;
+    uint8_t is_normal;
 
     controller_t *main;
   } controller_interrupt_t;
index 3b43b0cc5d2f72a2c0cd3cf23256fec99c073fe0..a9f2745be136849cdb2fcc7379a583641239cc31 100644 (file)
@@ -271,7 +271,7 @@ extern "C" {
     // Entry Items.
     if (entry->items.used) {
       controller_entry_action_t *action = 0;
-      bool raw = F_false;
+      uint8_t raw = F_false;
       f_number_unsigned_t k = 0;
 
       for (i = 0; i < entry->items.used; ++i) {
index c00459656c07786f472085f777fcb3c30e995044..ab0e2ca627f2d72a5017722fce00d10b230df9fc 100644 (file)
@@ -16,7 +16,7 @@ extern "C" {
 
     // Find at least one of the requested Action.
     {
-      bool missing = F_true;
+      uint8_t missing = F_true;
 
       for (; i < rule->items.used; ++i) {