Skip to content
Snippets Groups Projects
Commit fbd2315b authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

And now Coverity gets into the false warning game.

Fix incorrect Coverity issue that speculates this may return fval.
parent f754ad90
No related branches found
No related tags found
No related merge requests found
Pipeline #5897 passed
......@@ -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++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment