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
This commit is contained in:
+2
-1
@@ -2,6 +2,7 @@
|
|||||||
#define STK_H
|
#define STK_H
|
||||||
|
|
||||||
#include "stk_version.h"
|
#include "stk_version.h"
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
/* Buffers */
|
/* Buffers */
|
||||||
@@ -54,7 +55,7 @@ typedef enum {
|
|||||||
STK_MOD_RELOAD
|
STK_MOD_RELOAD
|
||||||
} stk_module_event_t;
|
} stk_module_event_t;
|
||||||
|
|
||||||
int stk_init(void);
|
uint8_t stk_init(void);
|
||||||
void stk_shutdown(void);
|
void stk_shutdown(void);
|
||||||
size_t stk_module_count(void);
|
size_t stk_module_count(void);
|
||||||
size_t stk_poll(void);
|
size_t stk_poll(void);
|
||||||
|
|||||||
@@ -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;
|
char (*files)[STK_PATH_MAX] = NULL;
|
||||||
size_t file_count, i, successful_loads = 0;
|
size_t file_count, i, successful_loads = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user