From 89e4bf78cc9cf80967cc4caa7b4283b617a0effe Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Wed, 19 Aug 2015 03:50:22 +0200 Subject: [PATCH] cfg: Fix nit --- core/cfg/ini.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/cfg/ini.cpp b/core/cfg/ini.cpp index c6f9be940..b900aada6 100644 --- a/core/cfg/ini.cpp +++ b/core/cfg/ini.cpp @@ -69,7 +69,7 @@ bool ConfigFile::has_section(string name) bool ConfigFile::has_entry(string section_name, string entry_name) { ConfigSection* section = this->get_section(section_name); - return ((section == NULL) ? false : section->has_entry(entry_name)); + return ((section != NULL) && section->has_entry(entry_name)); } ConfigSection* ConfigFile::add_section(string name) @@ -250,3 +250,4 @@ void ConfigFile::save(FILE* file) fputs("\n", file); } } +