On Thu, 26 Aug 2010, Enlightenment SVN wrote:

> Log:
>  Apply double_condition_check.cocci

I do not agree at all with that patch. It is hiding potential problems. 
The double condition check is in most case a copy/paste error that needs 
fixing instead of removal.

Please revert it.

Vincent

>
>  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.
>
>
>
> Author:       lucas
> Date:         2010-08-26 13:45:09 -0700 (Thu, 26 Aug 2010)
> New Revision: 51666
>
> Modified:
>  trunk/E16/e/src/backgrounds.c trunk/PROTO/eon/src/lib/layout/eon_stack.c 
> trunk/ecore/src/lib/ecore_win32/ecore_win32.c 
> trunk/ecore/src/lib/ecore_wince/ecore_wince.c trunk/edje/src/lib/edje_edit.c 
> trunk/evas/src/lib/cache/evas_cache_image.c 
> trunk/exalt/src/lib/libexalt_private.c
>
> Modified: trunk/E16/e/src/backgrounds.c
> ===================================================================
> --- trunk/E16/e/src/backgrounds.c     2010-08-26 20:38:37 UTC (rev 51665)
> +++ trunk/E16/e/src/backgrounds.c     2010-08-26 20:45:09 UTC (rev 51666)
> @@ -350,8 +350,8 @@
>      {
>       if ((strcmp(bg->bg.file, bgx->bg.file)) ||
>           (bg->bg.keep_aspect != bgx->bg.keep_aspect) ||
> -         (bg->bg.xjust != bgx->bg.xjust || bg->bg.xjust != bgx->bg.xjust) ||
> -         (bg->bg.xperc != bgx->bg.xperc || bg->bg.xperc != bgx->bg.xperc))
> +         (bg->bg.xjust != bgx->bg.xjust) ||
> +         (bg->bg.xperc != bgx->bg.xperc))
>          return 1;
>      }
>    else if (bg->bg.file || bgx->bg.file)
> @@ -361,10 +361,8 @@
>      {
>       if ((strcmp(bg->top.file, bgx->top.file)) ||
>           (bg->top.keep_aspect != bgx->top.keep_aspect) ||
> -         (bg->top.xjust != bgx->top.xjust ||
> -          bg->top.xjust != bgx->top.xjust) ||
> -         (bg->top.xperc != bgx->top.xperc ||
> -          bg->top.xperc != bgx->top.xperc))
> +         (bg->top.xjust != bgx->top.xjust) ||
> +         (bg->top.xperc != bgx->top.xperc))
>          return 1;
>      }
>    else if (bg->top.file || bgx->top.file)
>
> Modified: trunk/PROTO/eon/src/lib/layout/eon_stack.c
> ===================================================================
> --- trunk/PROTO/eon/src/lib/layout/eon_stack.c        2010-08-26 20:38:37 UTC 
> (rev 51665)
> +++ trunk/PROTO/eon/src/lib/layout/eon_stack.c        2010-08-26 20:45:09 UTC 
> (rev 51666)
> @@ -201,9 +201,7 @@
>       Eon_Paint *prev;
>       int final;
>
> -     if ((!ekeko_type_instance_is_of(em->related, EON_TYPE_PAINT_SQUARE)) &&
> -                     (!ekeko_type_instance_is_of(em->related,
> -                     EON_TYPE_PAINT_SQUARE)))
> +     if ((!ekeko_type_instance_is_of(em->related, EON_TYPE_PAINT_SQUARE)))
>               return;
>
>       prv = PRIVATE(o);
>
> Modified: trunk/ecore/src/lib/ecore_win32/ecore_win32.c
> ===================================================================
> --- trunk/ecore/src/lib/ecore_win32/ecore_win32.c     2010-08-26 20:38:37 UTC 
> (rev 51665)
> +++ trunk/ecore/src/lib/ecore_win32/ecore_win32.c     2010-08-26 20:45:09 UTC 
> (rev 51666)
> @@ -362,8 +362,7 @@
>        _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)
>
> Modified: trunk/ecore/src/lib/ecore_wince/ecore_wince.c
> ===================================================================
> --- trunk/ecore/src/lib/ecore_wince/ecore_wince.c     2010-08-26 20:38:37 UTC 
> (rev 51665)
> +++ trunk/ecore/src/lib/ecore_wince/ecore_wince.c     2010-08-26 20:45:09 UTC 
> (rev 51666)
> @@ -311,8 +311,7 @@
>        _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)
>
> Modified: trunk/edje/src/lib/edje_edit.c
> ===================================================================
> --- trunk/edje/src/lib/edje_edit.c    2010-08-26 20:38:37 UTC (rev 51665)
> +++ trunk/edje/src/lib/edje_edit.c    2010-08-26 20:45:09 UTC (rev 51666)
> @@ -5889,8 +5889,7 @@
>                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",
>
> Modified: trunk/evas/src/lib/cache/evas_cache_image.c
> ===================================================================
> --- trunk/evas/src/lib/cache/evas_cache_image.c       2010-08-26 20:38:37 UTC 
> (rev 51665)
> +++ trunk/evas/src/lib/cache/evas_cache_image.c       2010-08-26 20:45:09 UTC 
> (rev 51666)
> @@ -727,7 +727,7 @@
>         (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;
>
> Modified: trunk/exalt/src/lib/libexalt_private.c
> ===================================================================
> --- trunk/exalt/src/lib/libexalt_private.c    2010-08-26 20:38:37 UTC (rev 
> 51665)
> +++ trunk/exalt/src/lib/libexalt_private.c    2010-08-26 20:45:09 UTC (rev 
> 51666)
> @@ -67,7 +67,7 @@
>
>     EXALT_ASSERT_RETURN(!
>             (!exalt_admin_is() &&
> -             ( request == SIOCSIFFLAGS || request == SIOCSIFFLAGS
> +             ( request == SIOCSIFFLAGS
>                || request == SIOCDELRT || request == SIOCSIFADDR
>                || request == SIOCSIFNETMASK || request == SIOCADDRT
>                || request== SIOCETHTOOL )));
>
>
> ------------------------------------------------------------------------------
> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
> Be part of this innovative community and reach millions of netbook users
> worldwide. Take advantage of special opportunities to increase revenue and
> speed time-to-market. Join now, and jumpstart your future.
> http://p.sf.net/sfu/intel-atom-d2d
> _______________________________________________
> enlightenment-svn mailing list
> enlightenment-...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>
>

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to