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

@@ -178,7 +178,7 @@ void
nm_main_utils_ensure_root ()
{
if (getuid () != 0) {
fprintf (stderr, _("You must be root to run %s!\n"), str_if_set (g_get_prgname (), ""));
fprintf (stderr, _("You must be root to run %s!\n"), g_get_prgname () ?: "");
exit (1);
}
}