Apply double_condition_check.cocci

The offending projects were:

 E16/e/src/backgrounds.c                 |   10 ++++------
 PROTO/eon/src/lib/layout/eon_stack.c    |    4 +---
 ecore/src/lib/ecore_win32/ecore_win32.c |    3 +--
 ecore/src/lib/ecore_wince/ecore_wince.c |    3 +--
 edje/src/lib/edje_edit.c                |    3 +--
 evas/src/lib/cache/evas_cache_image.c   |    2 +-
 exalt/src/lib/libexalt_private.c        |    2 +-


This patch assumes code in these places were insane and the fix is to remove
one condition check. Most likely this is not true, but there's no automatic fix
for that.

Looking at the patch, it seems that some places should use "x" and "y" vars but
used just one of them and therefore they were caught by coccinelle.




SVN revision: 51666
This commit is contained in:
Lucas De Marchi 2010-08-26 20:45:09 +00:00
parent 2ab7f0f809
commit 255b2cb870
4 changed files with 4 additions and 7 deletions

View File

@ -362,8 +362,7 @@ _ecore_win32_window_procedure(HWND window,
_ecore_win32_event_handle_destroy_notify(data);
return 0;
case WM_SHOWWINDOW:
if ((data->data_param == SW_OTHERUNZOOM) ||
(data->data_param == SW_OTHERUNZOOM))
if ((data->data_param == SW_OTHERUNZOOM))
return 0;
if (data->window_param)

View File

@ -311,8 +311,7 @@ _ecore_wince_window_procedure(HWND window,
_ecore_wince_event_handle_destroy_notify(data);
break;
case WM_SHOWWINDOW:
if ((data->data_param == SW_OTHERUNZOOM) ||
(data->data_param == SW_OTHERUNZOOM))
if ((data->data_param == SW_OTHERUNZOOM))
break;
if (data->window_param)

View File

@ -5889,8 +5889,7 @@ _edje_generate_source_of_part(Evas_Object *obj, Edje_Part *ep, Eina_Strbuf *buf)
effects[edje_edit_part_effect_get(obj, part)]);
//Dragable
if (edje_edit_part_drag_x_get(obj, part) ||
edje_edit_part_drag_x_get(obj, part))
if (edje_edit_part_drag_x_get(obj, part))
{
BUF_APPEND(I4"dragable {\n");
BUF_APPENDF(I5"x: %d %d %d;\n",

View File

@ -727,7 +727,7 @@ evas_cache_image_request(Evas_Cache_Image *cache, const char *file, const char *
(lo->scale_down_by == 0) &&
(lo->dpi == 0.0) &&
((lo->w == 0) || (lo->h == 0)) &&
((lo->region.w == 0) || (lo->region.w == 0))
((lo->region.w == 0))
))
{
lo = &prevent;