raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=49df80aa6f547dcbdbce844b04af594396451f69
commit 49df80aa6f547dcbdbce844b04af594396451f69 Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Thu Sep 28 12:17:44 2017 +0900 efl ui win - quieten coverity complaint about dead code the count ?: 1 check is pointless as count is already checked above. make it clearer that it's > 0 and remove the ? check. silence for coverity CID 1380542 --- src/lib/elementary/efl_ui_win.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 7a2a03be6e..4a112e5b00 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -8335,21 +8335,21 @@ EAPI void elm_win_available_profiles_set(Elm_Win *obj, const char **profiles, unsigned int count) { if (!efl_isa(obj, MY_CLASS)) return; - if (count && profiles) + if ((count > 0) && (profiles)) { Eina_Array *ar; unsigned int i; - ar = eina_array_new(count ?: 1); - for (i = 0; i < count; i++) - eina_array_push(ar, profiles[i]); - efl_ui_win_wm_available_profiles_set(obj, ar); - eina_array_free(ar); - } - else - { - efl_ui_win_wm_available_profiles_set(obj, NULL); + ar = eina_array_new(count); + if (ar) + { + for (i = 0; i < count; i++) + eina_array_push(ar, profiles[i]); + efl_ui_win_wm_available_profiles_set(obj, ar); + eina_array_free(ar); + } } + else efl_ui_win_wm_available_profiles_set(obj, NULL); } // deprecated --
