Skip to content

Commit

Permalink
Merge pull request #373 from dscho/avoid-using-uninitialized-vars
Browse files Browse the repository at this point in the history
Avoid using uninitialized variables in `format_tracking_info()`
  • Loading branch information
dscho authored Jun 11, 2021
2 parents 656bba7 + cd4928c commit 2f9b245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -2110,7 +2110,7 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb,
sti = stat_tracking_info(branch, &ours, &theirs, &full_base, 0, abf);
trace2_data_intmax("tracking", NULL, "stat_tracking_info/ab_flags", abf);
trace2_data_intmax("tracking", NULL, "stat_tracking_info/ab_result", sti);
if (abf == AHEAD_BEHIND_FULL) {
if (sti >= 0 && abf == AHEAD_BEHIND_FULL) {
trace2_data_intmax("tracking", NULL, "stat_tracking_info/ab_ahead", ours);
trace2_data_intmax("tracking", NULL, "stat_tracking_info/ab_behind", theirs);
}
Expand Down

0 comments on commit 2f9b245

Please sign in to comment.