mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 21:38:00 +01:00
wmaker: remove unnecessary null check (Coverity #50196)
As pointed by Coverity, text cannot be null in this part of code. The analysis shows that if it were, the function wIconChangeImageFile would have directed execution to the 'else' branch. (and if it hadn't, the code would have crashed beforehand because 'strlen' does not like null pointers) Coverity recommends to remove the unnecessary check for code the maintainability. Signed-off-by: Christophe CURIS <christophe.curis@free.fr> Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This commit is contained in:
committed by
Carlos R. Mafra
parent
694e66e30d
commit
e27bab9f36
@@ -170,8 +170,7 @@ static void panelBtnCallback(WMWidget * self, void *data)
|
|||||||
snprintf(buf, len, _("Could not open specified icon file: %s"), text);
|
snprintf(buf, len, _("Could not open specified icon file: %s"), text);
|
||||||
if (wMessageDialog(panel->wwin->screen_ptr, _("Error"), buf,
|
if (wMessageDialog(panel->wwin->screen_ptr, _("Error"), buf,
|
||||||
_("OK"), _("Ignore"), NULL) == WAPRDefault) {
|
_("OK"), _("Ignore"), NULL) == WAPRDefault) {
|
||||||
if (text)
|
wfree(text);
|
||||||
wfree(text);
|
|
||||||
wfree(buf);
|
wfree(buf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user