]> git.ipfire.org Git - thirdparty/git.git/commit
t: harmonize t-reftable-stack.c with coding guidelines
authorChandra Pratap <chandrapratap3519@gmail.com>
Sun, 8 Sep 2024 04:05:57 +0000 (09:35 +0530)
committerJunio C Hamano <gitster@pobox.com>
Sun, 8 Sep 2024 20:24:03 +0000 (13:24 -0700)
commite4e384f68d2e9c2fd726bfc9d16f2359c0dda69c
tree9668f55c917280298a2543caaaa69a105e2cbcf4
parent15e29ea1c648149304b31d662b286718d0e6fde8
t: harmonize t-reftable-stack.c with coding guidelines

Harmonize the newly ported test unit-tests/t-reftable-stack.c
with the following guidelines:
- Single line 'for' statements must omit curly braces.
- Structs must be 0-initialized with '= { 0 }' instead of '= { NULL }'.
- Array sizes and indices should preferably be of type 'size_t' and
  not 'int'.
- Function pointers should be passed as 'func' and not '&func'.

While at it, remove initialization for those variables that are
re-used multiple times, like loop variables.

Mentored-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/unit-tests/t-reftable-stack.c