]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
util: use cleanup to avoid goto in argconfig_parse()
authorCaleb Sander Mateos <csander@purestorage.com>
Tue, 16 Jul 2024 15:57:38 +0000 (09:57 -0600)
committerDaniel Wagner <wagi@monom.org>
Wed, 17 Jul 2024 14:57:45 +0000 (16:57 +0200)
commitba72357b9284736637cf04ca9be1616a3b34ff39
treec3facf22c8583cf88a2fe77854c9736e976be4b7
parent7a925d6dfbe28507697ac98284a362cc36890432
util: use cleanup to avoid goto in argconfig_parse()

Use _cleanup_free_ in place of explicit calls to free()
in argconfig_parse(). This simplifies the code
and allows using an early return in place of a goto.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
util/argconfig.c