use a constant for the mod dir buffer size

This commit is contained in:
2025-11-02 12:44:10 +01:00
parent a66d9f9357
commit 7d7f02d1be
3 changed files with 4 additions and 2 deletions
+2
View File
@@ -4,6 +4,8 @@
#include "stk_version.h" #include "stk_version.h"
#include <stdlib.h> #include <stdlib.h>
#define MOD_DIR_BUFFER_SIZE 32
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
+1 -1
View File
@@ -7,7 +7,7 @@ void *platform_get_symbol(void *handle, const char *symbol);
typedef void (*stk_module_func)(void); typedef void (*stk_module_func)(void);
char *stk_mod_dir = NULL; char stk_mod_dir[MOD_DIR_BUFFER_SIZE];
static void **stk_handles = NULL; static void **stk_handles = NULL;
static stk_module_func *stk_inits = NULL; static stk_module_func *stk_inits = NULL;
static stk_module_func *stk_shutdowns = NULL; static stk_module_func *stk_shutdowns = NULL;
+1 -1
View File
@@ -1,7 +1,7 @@
#include "stk.h" #include "stk.h"
#include "stk_log.h" #include "stk_log.h"
extern char *stk_mod_dir; extern char stk_mod_dir[MOD_DIR_BUFFER_SIZE];
int stk_init(const char *mod_dir) int stk_init(const char *mod_dir)
{ {