From b81c10e00cc71bf1be90510114e410ed691dc266 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Wed, 18 Jun 2014 23:09:02 +0200 Subject: lib/parse_ini.c: Cosmetic change Replace an "if" with the ternary operator. --- lib/parse_ini.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/parse_ini.c b/lib/parse_ini.c index cd3d8271..30b79d74 100644 --- a/lib/parse_ini.c +++ b/lib/parse_ini.c @@ -120,10 +120,7 @@ np_get_defaults(const char *locator, const char *default_section) np_ini_info i; parse_locator(locator, default_section, &i); - if (strcmp(i.file, "-") == 0) - inifile = stdin; - else - inifile = fopen(i.file, "r"); + inifile = strcmp(i.file, "-") == 0 ? stdin : fopen(i.file, "r"); if (inifile == NULL) die(STATE_UNKNOWN, "%s\n", _("Can't read config file")); -- cgit v1.2.3-74-g34f1