Skip to content

Commit 46d0ee2

Browse files
AZero13gitster
authored andcommitted
refs: dereference the value of the required pointer
Currently, this always prints yes because required is non-null. This is the wrong behavior. The boolean must be dereferenced. Signed-off-by: Greg Funni <gfunni234@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 28b83e6 commit 46d0ee2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

refs/debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static int debug_optimize_required(struct ref_store *ref_store,
131131
struct debug_ref_store *drefs = (struct debug_ref_store *)ref_store;
132132
int res = drefs->refs->be->optimize_required(drefs->refs, opts, required);
133133
trace_printf_key(&trace_refs, "optimize_required: %s, res: %d\n",
134-
required ? "yes" : "no", res);
134+
*required ? "yes" : "no", res);
135135
return res;
136136
}
137137

0 commit comments

Comments
 (0)