Skip to content

Commit

Permalink
Merge pull request #2184 from dscho/address-coverity-report
Browse files Browse the repository at this point in the history
Fix some issues reported by Coverity
  • Loading branch information
dscho committed May 10, 2019
2 parents ba637d3 + d0033a2 commit f866bf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion builtin/bisect--helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,10 @@ static int bisect_start(struct bisect_terms *terms, int no_checkout,
write_file(git_path_bisect_start(), "%s\n", start_head.buf);

if (no_checkout) {
get_oid(start_head.buf, &oid);
if (get_oid(start_head.buf, &oid) < 0) {
retval = error(_("invalid ref: '%s'"), start_head.buf);
goto finish;
}
if (update_ref(NULL, "BISECT_HEAD", &oid, NULL, 0,
UPDATE_REFS_MSG_ON_ERR)) {
retval = -1;
Expand Down
2 changes: 1 addition & 1 deletion builtin/rebase.c
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ static int rebase_config(const char *var, const char *value, void *data)
if (git_config_bool(var, value))
opts->flags |= REBASE_DIFFSTAT;
else
opts->flags &= !REBASE_DIFFSTAT;
opts->flags &= ~REBASE_DIFFSTAT;
return 0;
}

Expand Down

0 comments on commit f866bf0

Please sign in to comment.