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:
Thomas Haller
2016-03-08 17:41:31 +01:00
parent 24d96e6f65
commit b36d721525
15 changed files with 16 additions and 32 deletions

View File

@@ -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