edje: calc - add curly braces to avoid ambiguous 'if'
authorAmitesh Singh <amitesh.sh@samsung.com>
Wed, 9 Dec 2015 10:25:59 +0000 (15:55 +0530)
committerAmitesh Singh <amitesh.sh@samsung.com>
Wed, 9 Dec 2015 10:28:00 +0000 (15:58 +0530)
merge two if conditions into one also.

src/lib/edje/edje_calc.c

index c06e3ac..ff2146d 100644 (file)
@@ -432,11 +432,12 @@ _edje_part_description_find(Edje *ed, Edje_Real_Part *rp, const char *state_name
    unsigned int i;
 
    /* RTL flag is set, return RTL description */
-   if (edje_object_mirrored_get(ed->obj))
-     if (!ep->other.desc_rtl)
-       ep->other.desc_rtl = (Edje_Part_Description_Common **)
-         calloc(ep->other.desc_count,
-                sizeof (Edje_Part_Description_Common *));
+   if (edje_object_mirrored_get(ed->obj) && !ep->other.desc_rtl)
+     {
+        ep->other.desc_rtl = (Edje_Part_Description_Common **)
+           calloc(ep->other.desc_count,
+                  sizeof (Edje_Part_Description_Common *));
+     }
 
    if (!strcmp(state_name, "default") && state_val == 0.0)
      return _edje_get_description_by_orientation(ed,