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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user