From: Arnaud Giersch Date: Sat, 20 Apr 2019 20:21:32 +0000 (+0200) Subject: Slight simplification. X-Git-Tag: v3.22.2~60 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/355e716d62ca240e1743c8e98d9727ed48bbe900?hp=649530d077d1a5bd5866e6f98b597fc9e2d01165 Slight simplification. --- diff --git a/src/xbt/log.cpp b/src/xbt/log.cpp index cd6f5496dd..ec4939dfd0 100644 --- a/src/xbt/log.cpp +++ b/src/xbt/log.cpp @@ -409,11 +409,7 @@ static xbt_log_setting_t _xbt_log_parse_setting(const char *control_string) "Unknown priority name: %s (must be one of: trace,debug,verbose,info,warning,error,critical)", value); } } else if (strncmp(option, "additivity", option_len) == 0) { - if (strcasecmp(value, "ON") == 0 || strcasecmp(value, "YES") == 0 || strcmp(value, "1") == 0) { - set.additivity = 1; - } else { - set.additivity = 0; - } + set.additivity = (strcasecmp(value, "ON") == 0 || strcasecmp(value, "YES") == 0 || strcmp(value, "1") == 0); } else if (strncmp(option, "appender", option_len) == 0) { if (strncmp(value, "file:", 5) == 0) { set.appender = xbt_log_appender_file_new(value + 5);