From fbd2315bd2647948b18e26ae6f0a709ce2e759e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net> Date: Wed, 21 Feb 2024 08:42:40 -0500 Subject: [PATCH] And now Coverity gets into the false warning game. Fix incorrect Coverity issue that speculates this may return fval. --- src/xpdev/ini_file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xpdev/ini_file.c b/src/xpdev/ini_file.c index 7cb4aeab9f..a189e1ea28 100644 --- a/src/xpdev/ini_file.c +++ b/src/xpdev/ini_file.c @@ -1021,9 +1021,9 @@ char* iniReadSString(FILE* fp, const char* section, const char* key, const char* ret = iniReadString(fp, section, key, deflt, fval); if (ret == NULL) - return ret; + return NULL; if (ret == deflt) - return ret; + return deflt; if (sz < 1 || value == NULL) return value; for (pos = 0; ret[pos]; pos++) { @@ -1068,9 +1068,9 @@ char* iniGetSString(str_list_t list, const char* section, const char* key, const ret = iniGetString(list, section, key, deflt, fval); if (ret == NULL) - return ret; + return NULL; if (ret == deflt) - return ret; + return deflt; if (sz < 1 || value == NULL) return value; for (pos = 0; ret[pos]; pos++) { -- GitLab