summaryrefslogtreecommitdiff
path: root/src/bin/exactness
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2020-02-26 17:18:07 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2020-02-27 15:58:34 +0100
commitce912f688e696aac10a56a374447a045ab4de2c2 (patch)
treed739b8adc1a1b300fb4e1e32a19ddc644e2324e4 /src/bin/exactness
parenta3fdc0dc36b8c5de5ced4af986b769c8cd81dc38 (diff)
exactness: inspect: use logical OR instead bitwise XOR
Coverity pointed these out as we deferences after null check. Looking into it showed these use of a bitwise operator on vars where it does not make any sense (to me). They look like wrongly done NULL checks. Switchign them over to a logical OR operator. CID: 1419876, 1419869, 1419868, 1419862, 1419854, 1419849 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11432
Diffstat (limited to 'src/bin/exactness')
-rw-r--r--src/bin/exactness/inspect.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bin/exactness/inspect.c b/src/bin/exactness/inspect.c
index e982afed7d..a04a5217df 100644
--- a/src/bin/exactness/inspect.c
+++ b/src/bin/exactness/inspect.c
@@ -168,7 +168,7 @@ _is_hook_duplicate(const Exactness_Action *cur_act, const Exactness_Action *prev
168static Eina_Bool 168static Eina_Bool
169_are_scenario_entries_different(Exactness_Action *act1, Exactness_Action *act2) 169_are_scenario_entries_different(Exactness_Action *act1, Exactness_Action *act2)
170{ 170{
171 if (!act1 ^ !act2) return EINA_TRUE; 171 if (!act1 || !act2) return EINA_TRUE;
172 if (act1->type != act2->type) return EINA_TRUE; 172 if (act1->type != act2->type) return EINA_TRUE;
173 switch(act1->type) 173 switch(act1->type)
174 { 174 {
@@ -207,7 +207,7 @@ _are_images_different(Exactness_Image *e_img1, Exactness_Image *e_img2)
207 unsigned int w, h; 207 unsigned int w, h;
208 int *pxs1 = NULL; 208 int *pxs1 = NULL;
209 int *pxs2 = NULL; 209 int *pxs2 = NULL;
210 if (!e_img1 ^ !e_img2) return EINA_TRUE; 210 if (!e_img1 || !e_img2) return EINA_TRUE;
211 if (e_img1->w != e_img2->w) return EINA_TRUE; 211 if (e_img1->w != e_img2->w) return EINA_TRUE;
212 if (e_img1->h != e_img2->h) return EINA_TRUE; 212 if (e_img1->h != e_img2->h) return EINA_TRUE;
213 pxs1 = e_img1->pixels; 213 pxs1 = e_img1->pixels;
@@ -226,7 +226,7 @@ _are_images_different(Exactness_Image *e_img1, Exactness_Image *e_img2)
226static Eina_Bool 226static Eina_Bool
227_are_objs_different(Exactness_Object *e_obj1, Exactness_Object *e_obj2, Eina_Bool check_objs) 227_are_objs_different(Exactness_Object *e_obj1, Exactness_Object *e_obj2, Eina_Bool check_objs)
228{ 228{
229 if (!e_obj1 ^ !e_obj2) return EINA_TRUE; 229 if (!e_obj1 || !e_obj2) return EINA_TRUE;
230 Eina_List *itr1 = e_obj1->children; 230 Eina_List *itr1 = e_obj1->children;
231 Eina_List *itr2 = e_obj2->children; 231 Eina_List *itr2 = e_obj2->children;
232 if (check_objs && 232 if (check_objs &&
@@ -250,7 +250,7 @@ _are_objs_different(Exactness_Object *e_obj1, Exactness_Object *e_obj2, Eina_Boo
250static Eina_Bool 250static Eina_Bool
251_are_objs_trees_different(Exactness_Objects *e_objs1, Exactness_Objects *e_objs2) 251_are_objs_trees_different(Exactness_Objects *e_objs1, Exactness_Objects *e_objs2)
252{ 252{
253 if (!e_objs1 ^ !e_objs2) return EINA_TRUE; 253 if (!e_objs1 || !e_objs2) return EINA_TRUE;
254 Eina_List *itr1 = e_objs1->objs; 254 Eina_List *itr1 = e_objs1->objs;
255 Eina_List *itr2 = e_objs2->objs; 255 Eina_List *itr2 = e_objs2->objs;
256 Exactness_Object *e_obj1, *e_obj2; 256 Exactness_Object *e_obj1, *e_obj2;
@@ -325,7 +325,7 @@ _grp_text_get(void *data, Evas_Object *gl, const char *part EINA_UNUSED)
325 Eo *gl2 = eina_list_nth(_gls, 1); 325 Eo *gl2 = eina_list_nth(_gls, 1);
326 Exactness_Unit *unit1 = efl_key_data_get(gl1, "unit"); 326 Exactness_Unit *unit1 = efl_key_data_get(gl1, "unit");
327 Exactness_Unit *unit2 = efl_key_data_get(gl2, "unit"); 327 Exactness_Unit *unit2 = efl_key_data_get(gl2, "unit");
328 if (!!unit1->fonts_path ^ !!unit2->fonts_path) 328 if (!!unit1->fonts_path || !!unit2->fonts_path)
329 sprintf(buf2, "Fonts directory comparison: XXXXX"); 329 sprintf(buf2, "Fonts directory comparison: XXXXX");
330 else if (!strcmp(unit1->fonts_path, unit2->fonts_path)) 330 else if (!strcmp(unit1->fonts_path, unit2->fonts_path))
331 sprintf(buf2, "Fonts directory comparison: %s", unit1->fonts_path); 331 sprintf(buf2, "Fonts directory comparison: %s", unit1->fonts_path);
@@ -356,7 +356,7 @@ _scn_text_get(void *data, Evas_Object *gl, const char *part EINA_UNUSED)
356 Exactness_Action *a1 = vv->p1; 356 Exactness_Action *a1 = vv->p1;
357 Exactness_Action *a2 = vv->p2; 357 Exactness_Action *a2 = vv->p2;
358 358
359 if (!a1 ^ !a2) 359 if (!a1 || !a2)
360 { 360 {
361 eina_strbuf_free(buf); 361 eina_strbuf_free(buf);
362 return strdup("XXXXX"); 362 return strdup("XXXXX");