]> git.ipfire.org Git - thirdparty/libvirt.git/commit
lib: Use NULLSTR family of macros more
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 19 Aug 2024 10:26:27 +0000 (12:26 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 19 Aug 2024 11:44:12 +0000 (13:44 +0200)
commitab7f877f27caa7249f42e93678dbdb1a2ef2cc4e
tree7cc6de5f1a1b60e5ba3adb0c4787856a4aae3bbc
parent378052296804e5b19fd14cb62d3e63e1d14fe2f8
lib: Use NULLSTR family of macros more

There is a family of convenient macros: NULLSTR, NULLSTR_EMPTY,
NULLSTR_STAR, NULLSTR_MINUS which hides ternary operator.

Generated using the following spatch (and its obvious variants):

  @@
  expression s;
  @@
    <+...
  - s ? s : "<null>"
  + NULLSTR(s)
    ...+>

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/libvirt.c
src/network/network_iptables.c
src/network/network_nftables.c
src/qemu/qemu_firmware.c
src/util/virnetdevip.c
tools/virsh-checkpoint.c
tools/virsh-domain-monitor.c
tools/virsh-nodedev.c