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.
2 instances 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.
2 instances of this defect were found in the following locations:
Instance 1 File :
src/refdb_fs.c
Enclosing Function :serialize_reflog_entry
Function :git_oid_tostr
https://github.com/siva-msft/libgit2/blob/1e987525b3bd86fc29e7ff67d973861efd22faf7/src/refdb_fs.c#L1770 Code extract:How can I fix it? Correct reference usage found in
src/diff_generate.c
at line1649
. https://github.com/siva-msft/libgit2/blob/1e987525b3bd86fc29e7ff67d973861efd22faf7/src/diff_generate.c#L1649 Code extract:Instance 2 File :
src/refdb_fs.c
Enclosing Function :serialize_reflog_entry
Function :git_oid_tostr
https://github.com/siva-msft/libgit2/blob/1e987525b3bd86fc29e7ff67d973861efd22faf7/src/refdb_fs.c#L1771 Code extract:How can I fix it? Correct reference usage found in
src/diff_generate.c
at line1649
. https://github.com/siva-msft/libgit2/blob/1e987525b3bd86fc29e7ff67d973861efd22faf7/src/diff_generate.c#L1649 Code extract: