From 2f4b91c729b8aaf1ec30ff1060effd3330125ae0 Mon Sep 17 00:00:00 2001 From: anth64 Date: Sat, 31 Jan 2026 22:40:21 +0100 Subject: [PATCH] refactor(stk): change stk_init() return type to uint8_t - Change function signature from int to uint8_t for clarity - Makes return type intent explicit as status flag --- include/stk.h | 3 ++- src/stk.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/stk.h b/include/stk.h index 3c367d9..3cbb149 100644 --- a/include/stk.h +++ b/include/stk.h @@ -2,6 +2,7 @@ #define STK_H #include "stk_version.h" +#include #include /* Buffers */ @@ -54,7 +55,7 @@ typedef enum { STK_MOD_RELOAD } stk_module_event_t; -int stk_init(void); +uint8_t stk_init(void); void stk_shutdown(void); size_t stk_module_count(void); size_t stk_poll(void); diff --git a/src/stk.c b/src/stk.c index 6f98588..2b1aad2 100644 --- a/src/stk.c +++ b/src/stk.c @@ -70,7 +70,7 @@ static const char *stk_error_string(int error_code) } } -int stk_init(void) +uint8_t stk_init(void) { char (*files)[STK_PATH_MAX] = NULL; size_t file_count, i, successful_loads = 0;