summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-09-28 12:17:44 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-09-28 15:28:00 +0900
commit49df80aa6f547dcbdbce844b04af594396451f69 (patch)
tree68eaa27c1e57cc7fc8e163795808a234fe6613de /src
parent35b65e0643f264ef5e7063ae1c92559fe67ce7ed (diff)
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
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_win.c20
1 files 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
8335elm_win_available_profiles_set(Elm_Win *obj, const char **profiles, unsigned int count) 8335elm_win_available_profiles_set(Elm_Win *obj, const char **profiles, unsigned int count)
8336{ 8336{
8337 if (!efl_isa(obj, MY_CLASS)) return; 8337 if (!efl_isa(obj, MY_CLASS)) return;
8338 if (count && profiles) 8338 if ((count > 0) && (profiles))
8339 { 8339 {
8340 Eina_Array *ar; 8340 Eina_Array *ar;
8341 unsigned int i; 8341 unsigned int i;
8342 8342
8343 ar = eina_array_new(count ?: 1); 8343 ar = eina_array_new(count);
8344 for (i = 0; i < count; i++) 8344 if (ar)
8345 eina_array_push(ar, profiles[i]); 8345 {
8346 efl_ui_win_wm_available_profiles_set(obj, ar); 8346 for (i = 0; i < count; i++)
8347 eina_array_free(ar); 8347 eina_array_push(ar, profiles[i]);
8348 } 8348 efl_ui_win_wm_available_profiles_set(obj, ar);
8349 else 8349 eina_array_free(ar);
8350 { 8350 }
8351 efl_ui_win_wm_available_profiles_set(obj, NULL);
8352 } 8351 }
8352 else efl_ui_win_wm_available_profiles_set(obj, NULL);
8353} 8353}
8354 8354
8355// deprecated 8355// deprecated