Hi,

from the looks of this patch you can probably save yourself some time
and compares by checking for pl->u.ep->name at the beginning of this
hunk and skipping it entirely if it's NULL.

Regards,
Daniel Willmann

On 09/11/2012 09:15 AM, Enlightenment SVN wrote:
> Log:
> edje: don't strcmp ith NULL.
>   
> 
> Author:       cedric
> Date:         2012-09-11 01:15:33 -0700 (Tue, 11 Sep 2012)
> New Revision: 76449

> Modified: trunk/edje/src/bin/edje_cc_out.c
> ===================================================================
> --- trunk/edje/src/bin/edje_cc_out.c  2012-09-11 07:59:19 UTC (rev 76448)
> +++ trunk/edje/src/bin/edje_cc_out.c  2012-09-11 08:15:33 UTC (rev 76449)
> @@ -1881,27 +1881,32 @@
>            {

if (pl->u.ep->name) {

>               for (i = 0 ; i < pc->programs.fnmatch_count ; i++)
>                 {
> -                  if (!strcmp(pl->u.ep->name, pc->programs.fnmatch[i]->name))
> +                  if (pl->u.ep->name && pc->programs.fnmatch[i]->name &&
> +                      !strcmp(pl->u.ep->name, pc->programs.fnmatch[i]->name))
>                      data_queue_anonymous_lookup(pc, pc->programs.fnmatch[i], 
> dest);
>                 }
>               for (i = 0 ; i < pc->programs.strcmp_count ; i++)
>                 {
> -                  if (!strcmp(pl->u.ep->name, pc->programs.strcmp[i]->name))
> +                  if (pl->u.ep->name && pc->programs.strcmp[i]->name &&
> +                      !strcmp(pl->u.ep->name, pc->programs.strcmp[i]->name))
>                      data_queue_anonymous_lookup(pc, pc->programs.strcmp[i], 
> dest);
>                 }
>               for (i = 0 ; i < pc->programs.strncmp_count ; i++)
>                 {
> -                  if (!strcmp(pl->u.ep->name, pc->programs.strncmp[i]->name))
> +                  if (pl->u.ep->name && pc->programs.strncmp[i]->name &&
> +                      !strcmp(pl->u.ep->name, pc->programs.strncmp[i]->name))
>                      data_queue_anonymous_lookup(pc, pc->programs.strncmp[i], 
> dest);
>                 }
>               for (i = 0 ; i < pc->programs.strrncmp_count ; i++)
>                 {
> -                  if (!strcmp(pl->u.ep->name, 
> pc->programs.strrncmp[i]->name))
> +                  if (pl->u.ep->name && pc->programs.strrncmp[i]->name &&
> +                      !strcmp(pl->u.ep->name, 
> pc->programs.strrncmp[i]->name))
>                      data_queue_anonymous_lookup(pc, 
> pc->programs.strrncmp[i], dest);
>                 }
>               for (i = 0 ; i < pc->programs.nocmp_count ; i++)
>                 {
> -                  if (!strcmp(pl->u.ep->name, pc->programs.nocmp[i]->name))
> +                  if (pl->u.ep->name && pc->programs.nocmp[i]->name &&
> +                      !strcmp(pl->u.ep->name, pc->programs.nocmp[i]->name))
>                      data_queue_anonymous_lookup(pc, pc->programs.nocmp[i], 
> dest);
>                 }

}

>            }


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to