]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Simplify vshTableRowAppend() calling in cmdList(), part two
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 19 Aug 2024 10:15:01 +0000 (12:15 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 20 Aug 2024 07:08:35 +0000 (09:08 +0200)
commitf644cba8ae9ea186c676736a495c16deb1485839
tree15210c90608f0c4cbe029e105db53d7616ebe187
parentcf0e0715e08e6f970f1170e4a1bc609c53544f68
virsh: Simplify vshTableRowAppend() calling in cmdList(), part two

Instead of having many if-else statements, each with its own
vshTableRowAppend() call, we can use a simple trick - have an
array of string pointers, set array members in the if bodies and
then call vshTableRowAppend() once.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
tools/virsh-domain-monitor.c