In this codebase, you often check the return value of the implicated function when calling it, but in this instance, it appears that you didn’t. Using a consistent return value checking and/or error handling approach can improve code robustness and readability.
1 instance of this defect were found in the following locations:
In this codebase, you often check the return value of the implicated function when calling it, but in this instance, it appears that you didn’t. Using a consistent return value checking and/or error handling approach can improve code robustness and readability.
1 instance of this defect were found in the following locations:
Instance 1 File :
src/indexer.c
Enclosing Function :git_indexer_commit
Function :git_hash_final
https://github.com/siva-msft/libgit2/blob/1e987525b3bd86fc29e7ff67d973861efd22faf7/src/indexer.c#L1137 Code extract:How can I fix it? Correct reference usage found in
src/pack-objects.c
at line669
. https://github.com/siva-msft/libgit2/blob/1e987525b3bd86fc29e7ff67d973861efd22faf7/src/pack-objects.c#L669 Code extract: