]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/configs: eliminate counter variable
authorKarel Zak <kzak@redhat.com>
Wed, 15 Oct 2025 13:15:02 +0000 (15:15 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 15 Oct 2025 13:15:02 +0000 (15:15 +0200)
commitdad16046185ab4d1d6e2603919acc7b67e6f032e
treeb9c49e62231248e85fbf281d7782562a2242e133
parent06805e9ec8db3cffeead4c64a211fd6692cd6cab
lib/configs: eliminate counter variable

Remove the counter variable and return list_count_entries()
directly. This simplifies the code by calculating the count
only when needed (on success path) rather than tracking it
throughout the function.

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/configs.c