]> git.ipfire.org Git - thirdparty/git.git/commit
t-reftable-readwrite: use 'for' in place of infinite 'while' loops
authorChandra Pratap <chandrapratap3519@gmail.com>
Tue, 13 Aug 2024 14:34:49 +0000 (20:04 +0530)
committerJunio C Hamano <gitster@pobox.com>
Tue, 13 Aug 2024 17:08:03 +0000 (10:08 -0700)
commit12f9ea473f00384147e334ff1f05c8f3b2fe1a78
tree12e5bb649118800856beb8f43f66d8f9f9aaf270
parent3dd4fb13a080ba9cbcf047e94b7fc4ed35b6153e
t-reftable-readwrite: use 'for' in place of infinite 'while' loops

Using a for loop with an empty conditional statement is more concise
and easier to read than an infinite 'while' loop in instances
where we need a loop variable. Hence, replace such instances of a
'while' loop with the equivalent 'for' loop.

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-readwrite.c