Skip to content

Commit

Permalink
Merge pull request #557 from dcantrell/uninitialized-structs
Browse files Browse the repository at this point in the history
Fix a couple small static analysis findings for uninitialized structs
  • Loading branch information
mlschroe authored Mar 27, 2024
2 parents 8817911 + 2c4ee52 commit dd3babb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/repo_rpmmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,8 @@ fill_cshash_from_new_solvables(struct parsedata *pd)
KeyValue kv;
Repokey *key;

memset(&kv, 0, sizeof(kv));

for (i = pd->first; i < pool->nsolvables; i++)
{
if (pool->solvables[i].repo != pd->repo)
Expand Down
1 change: 1 addition & 0 deletions ext/repo_susetags.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ lookup_shared_id(Repodata *data, Id p, Id keyname, Id voidid, int uninternalized
if (uninternalized)
{
KeyValue kv;
memset(&kv, 0, sizeof(kv));
Repokey *key = repodata_lookup_kv_uninternalized(data, p, keyname, &kv);
if (!key)
return 0;
Expand Down
1 change: 1 addition & 0 deletions ext/testcase.c
Original file line number Diff line number Diff line change
Expand Up @@ -1497,6 +1497,7 @@ testcase_solverresult(Solver *solv, int resultflags)
if ((resultflags & TESTCASE_RESULT_USERINSTALLED) != 0)
{
Queue q;
queue_init(&q);
solver_get_userinstalled(solv, &q, 0);
for (i = 0; i < q.count; i++)
{
Expand Down

0 comments on commit dd3babb

Please sign in to comment.