all: drop str_if_set() in favor of the "?:" operator
str_if_set() was added to replace the non-standard gcc extension "?:". However, "?:" is supported by clang as well and we already use it at several places. Also, str_if_set() did not follow our naming scheme and renaming to nm_str_if_set() would be ugly. So just drop it.
This commit is contained in:
@@ -4018,7 +4018,7 @@ link_get_type_name (NMPlatform *platform, int ifindex)
|
||||
return nm_link_type_to_string (obj->link.type);
|
||||
}
|
||||
/* Link type not detected. Fallback to rtnl_link_get_type()/IFLA_INFO_KIND. */
|
||||
return str_if_set (obj->link.kind, "unknown");
|
||||
return obj->link.kind ?: "unknown";
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
Reference in New Issue
Block a user