Remove VLA, optional in later C versions
All checks were successful
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=OFF (push) Successful in 14s
CMake / ubuntu-latest - shared=ON, pthread=OFF, posix=OFF (push) Successful in 14s
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=ON (push) Successful in 11s
CMake / ubuntu-latest - shared=ON, pthread=OFF, posix=ON (push) Successful in 13s
CMake / ubuntu-latest - shared=OFF, pthread=ON, posix=ON (push) Successful in 15s
CMake / ubuntu-latest - shared=ON, pthread=ON, posix=ON (push) Successful in 11s
All checks were successful
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=OFF (push) Successful in 14s
CMake / ubuntu-latest - shared=ON, pthread=OFF, posix=OFF (push) Successful in 14s
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=ON (push) Successful in 11s
CMake / ubuntu-latest - shared=ON, pthread=OFF, posix=ON (push) Successful in 13s
CMake / ubuntu-latest - shared=OFF, pthread=ON, posix=ON (push) Successful in 15s
CMake / ubuntu-latest - shared=ON, pthread=ON, posix=ON (push) Successful in 11s
Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
@@ -1105,11 +1105,12 @@ Value *ast_to_value(dcfg_Instance *instance, AST *root)
|
||||
|
||||
dcfg_Value *dcfg_parse(dcfg_Instance *instance, dcfg_StringView const file_path)
|
||||
{
|
||||
char path_buf[file_path.size + 1];
|
||||
memset(path_buf, 0, sizeof(path_buf));
|
||||
char *path_buf = malloc(file_path.size + 1);
|
||||
memset(path_buf, 0, file_path.size + 1);
|
||||
memcpy(path_buf, file_path.data, file_path.size);
|
||||
|
||||
char *abs = instance->realpath(path_buf);
|
||||
free(path_buf);
|
||||
if (!abs) {
|
||||
snprintf(instance->last_error, sizeof(instance->last_error) - 1,
|
||||
"realpath: %s", strerror(errno));
|
||||
|
Reference in New Issue
Block a user