git/refs
shejialuo 38cd6eead1 ref: initialize "fsck_ref_report" with zero
In "fsck.c::fsck_refs_error_function", we need to tell whether "oid" and
"referent" is NULL. So, we need to always initialize these parameters to
NULL instead of letting them point to anywhere when creating a new
"fsck_ref_report" structure.

The original code explicitly initializes the "path" member in the
"struct fsck_ref_report" to NULL (which implicitly 0-initializes other
members in the struct). It is more customary to use "{ 0 }" to express
that we are 0-initializing everything. In order to align with the
codebase, initialize "fsck_ref_report" with zero.

Mentored-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: shejialuo <shejialuo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-11-21 08:21:31 +09:00
..
debug.c refs: set up ref consistency check infrastructure 2024-08-08 09:36:53 -07:00
files-backend.c ref: initialize "fsck_ref_report" with zero 2024-11-21 08:21:31 +09:00
iterator.c refs: add referent to each_ref_fn 2024-08-09 08:47:34 -07:00
packed-backend.c Merge branch 'ps/pack-refs-auto-heuristics' 2024-09-12 11:47:23 -07:00
packed-backend.h refs/files: use heuristic to decide whether to repack with `--auto` 2024-09-04 08:03:24 -07:00
ref-cache.c refs: keep track of unresolved reference value in iterators 2024-08-09 08:47:33 -07:00
ref-cache.h refs: keep track of unresolved reference value in iterators 2024-08-09 08:47:33 -07:00
refs-internal.h Merge branch 'sj/ref-fsck' 2024-08-16 12:51:51 -07:00
reftable-backend.c Merge branch 'ps/reftable-alloc-failures' 2024-10-10 14:22:25 -07:00