mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
compat: add fallback implementation for reallocarray(3)
This commit is contained in:
@ -1270,7 +1270,7 @@ array_append (const char ***files,
|
||||
const char **new_files;
|
||||
|
||||
*n_files_allocated = (*n_files_allocated > 0) ? 2 * *n_files_allocated : 4;
|
||||
new_files = reallocarray (*files, *n_files_allocated, sizeof (**files));
|
||||
new_files = _sysprof_reallocarray (*files, *n_files_allocated, sizeof (**files));
|
||||
if (new_files == NULL)
|
||||
return false;
|
||||
*files = new_files;
|
||||
|
||||
Reference in New Issue
Block a user