mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
runtime: avoid uninitialized variable
`init_common` could return an uninitialized variable when there are no subsystems; simply return `0` in this case.
This commit is contained in:
@@ -16,7 +16,7 @@ static git_atomic32 init_count;
|
||||
static int init_common(git_runtime_init_fn init_fns[], size_t cnt)
|
||||
{
|
||||
size_t i;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
/* Initialize subsystems that have global state */
|
||||
for (i = 0; i < cnt; i++) {
|
||||
|
||||
Reference in New Issue
Block a user