all: use the elvis operator wherever possible
Coccinelle: @@ expression a, b; @@ -a ? a : b +a ?: b Applied with: spatch --sp-file ternary.cocci --in-place --smpl-spacing --dir . With some manual adjustments on spots that Cocci didn't catch for reasons unknown. Thanks to the marvelous effort of the GNU compiler developer we can now spare a couple of bits that could be used for more important things, like this commit message. Standards commitees yet have to catch up.
This commit is contained in:
@@ -6980,7 +6980,7 @@ handle_udev_event (NMUdevClient *udev_client,
|
||||
seqnum = udev_device_get_seqnum (udevice);
|
||||
_LOGD ("UDEV event: action '%s' subsys '%s' device '%s' (%s); seqnum=%" G_GUINT64_FORMAT,
|
||||
action, subsys, udev_device_get_sysname (udevice),
|
||||
ifindex ? ifindex : "unknown", seqnum);
|
||||
ifindex ?: "unknown", seqnum);
|
||||
|
||||
if (NM_IN_STRSET (action, "add", "move"))
|
||||
udev_device_added (platform, udevice);
|
||||
|
Reference in New Issue
Block a user