summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-07-10 11:39:44 -0700
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-10 21:10:23 +0200
commitfce5645d804a8971dd27542c979dd27a7aa8bc1a (patch)
treecf8c8839c5f25e58cc051fcea80b63da3ce9d11d
parent4e4210b0f349e08cf71a71c3e4a72f65cfd2535e (diff)
efl: use eina_streq for all property operation in model to avoid crash on NULL property name.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9266
-rw-r--r--src/lib/ecore/efl_composite_model.c6
-rw-r--r--src/lib/ecore/efl_filter_model.c2
-rw-r--r--src/lib/ecore/efl_loop_model.c2
-rw-r--r--src/lib/ecore/efl_select_model.c12
-rw-r--r--src/lib/eio/efl_io_model.c8
-rw-r--r--src/lib/eldbus/eldbus_model.c4
-rw-r--r--src/lib/eldbus/eldbus_model_object.c2
-rw-r--r--src/lib/elementary/efl_ui_average_model.c8
-rw-r--r--src/lib/elementary/efl_ui_exact_model.c24
-rw-r--r--src/lib/elementary/efl_ui_homogeneous_model.c24
10 files changed, 46 insertions, 46 deletions
diff --git a/src/lib/ecore/efl_composite_model.c b/src/lib/ecore/efl_composite_model.c
index 1cad58ae4d..17883e8cb5 100644
--- a/src/lib/ecore/efl_composite_model.c
+++ b/src/lib/ecore/efl_composite_model.c
@@ -197,7 +197,7 @@ _efl_composite_model_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Efl_Composite_Mo
197 properties = efl_model_properties_get(pd->source); 197 properties = efl_model_properties_get(pd->source);
198 EINA_ITERATOR_FOREACH(properties, property) 198 EINA_ITERATOR_FOREACH(properties, property)
199 { 199 {
200 if (!strcmp(property, EFL_COMPOSITE_MODEL_CHILD_INDEX)) 200 if (eina_streq(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
201 { 201 {
202 pd->need_index = EINA_FALSE; 202 pd->need_index = EINA_FALSE;
203 break; 203 break;
@@ -216,7 +216,7 @@ static Eina_Future *
216_efl_composite_model_efl_model_property_set(Eo *obj, Efl_Composite_Model_Data *pd, 216_efl_composite_model_efl_model_property_set(Eo *obj, Efl_Composite_Model_Data *pd,
217 const char *property, Eina_Value *value) 217 const char *property, Eina_Value *value)
218{ 218{
219 if (pd->need_index && !strcmp(property, EFL_COMPOSITE_MODEL_CHILD_INDEX)) 219 if (pd->need_index && eina_streq(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
220 { 220 {
221 if (pd->set_index || !pd->source) 221 if (pd->set_index || !pd->source)
222 return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY); 222 return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY);
@@ -233,7 +233,7 @@ _efl_composite_model_efl_model_property_get(const Eo *obj EINA_UNUSED, Efl_Compo
233 const char *property) 233 const char *property)
234{ 234{
235 Eina_Value *try; 235 Eina_Value *try;
236 if (pd->need_index && !strcmp(property, EFL_COMPOSITE_MODEL_CHILD_INDEX)) 236 if (pd->need_index && eina_streq(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
237 { 237 {
238 if (pd->set_index) 238 if (pd->set_index)
239 return eina_value_uint_new(pd->index); 239 return eina_value_uint_new(pd->index);
diff --git a/src/lib/ecore/efl_filter_model.c b/src/lib/ecore/efl_filter_model.c
index 9f2511cfa0..8a00d82141 100644
--- a/src/lib/ecore/efl_filter_model.c
+++ b/src/lib/ecore/efl_filter_model.c
@@ -551,7 +551,7 @@ static Eina_Value *
551_efl_filter_model_efl_model_property_get(const Eo *obj, Efl_Filter_Model_Data *pd, 551_efl_filter_model_efl_model_property_get(const Eo *obj, Efl_Filter_Model_Data *pd,
552 const char *property) 552 const char *property)
553{ 553{
554 if (pd->self && !strcmp(property, EFL_COMPOSITE_MODEL_CHILD_INDEX)) 554 if (pd->self && eina_streq(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
555 { 555 {
556 return eina_value_uint64_new(pd->self->mapped); 556 return eina_value_uint64_new(pd->self->mapped);
557 } 557 }
diff --git a/src/lib/ecore/efl_loop_model.c b/src/lib/ecore/efl_loop_model.c
index 11f64a7352..d3e52a63fb 100644
--- a/src/lib/ecore/efl_loop_model.c
+++ b/src/lib/ecore/efl_loop_model.c
@@ -40,7 +40,7 @@ _propagate_future(void *data, const Efl_Event *event)
40 Efl_Loop_Model_Watcher_Data *wd = data; 40 Efl_Loop_Model_Watcher_Data *wd = data;
41 41
42 EINA_ARRAY_ITER_NEXT(ev->changed_properties, i, property, it) 42 EINA_ARRAY_ITER_NEXT(ev->changed_properties, i, property, it)
43 if (property == wd->property || !strcmp(property, wd->property)) 43 if (property == wd->property || eina_streq(property, wd->property))
44 { 44 {
45 Eina_Value *v = efl_model_property_get(wd->obj, wd->property); 45 Eina_Value *v = efl_model_property_get(wd->obj, wd->property);
46 46
diff --git a/src/lib/ecore/efl_select_model.c b/src/lib/ecore/efl_select_model.c
index 1140fbf0f3..a8e267e816 100644
--- a/src/lib/ecore/efl_select_model.c
+++ b/src/lib/ecore/efl_select_model.c
@@ -258,7 +258,7 @@ _efl_select_model_efl_model_property_set(Eo *obj,
258{ 258{
259 Eina_Value vf = EINA_VALUE_EMPTY; 259 Eina_Value vf = EINA_VALUE_EMPTY;
260 260
261 if (!strcmp("single_selection", property)) 261 if (eina_streq("single_selection", property))
262 { 262 {
263 Eina_Bool single_selection = pd->single_selection; 263 Eina_Bool single_selection = pd->single_selection;
264 Eina_Bool changed; 264 Eina_Bool changed;
@@ -275,7 +275,7 @@ _efl_select_model_efl_model_property_set(Eo *obj,
275 return efl_loop_future_resolved(obj, vf); 275 return efl_loop_future_resolved(obj, vf);
276 } 276 }
277 277
278 if (!strcmp("child.selected", property)) 278 if (eina_streq("child.selected", property))
279 { 279 {
280 unsigned long l = 0; 280 unsigned long l = 0;
281 281
@@ -288,7 +288,7 @@ _efl_select_model_efl_model_property_set(Eo *obj,
288 .free = _clear_child); 288 .free = _clear_child);
289 } 289 }
290 290
291 if (pd->parent && !strcmp("self.selected", property)) 291 if (pd->parent && eina_streq("self.selected", property))
292 { 292 {
293 Eina_Bool prevflag = EINA_FALSE, newflag = EINA_FALSE; 293 Eina_Bool prevflag = EINA_FALSE, newflag = EINA_FALSE;
294 Eina_Bool single_selection = EINA_FALSE; 294 Eina_Bool single_selection = EINA_FALSE;
@@ -364,10 +364,10 @@ _efl_select_model_efl_model_property_set(Eo *obj,
364static Eina_Value * 364static Eina_Value *
365_efl_select_model_efl_model_property_get(const Eo *obj, Efl_Select_Model_Data *pd, const char *property) 365_efl_select_model_efl_model_property_get(const Eo *obj, Efl_Select_Model_Data *pd, const char *property)
366{ 366{
367 if (!strcmp("single_selection", property)) 367 if (eina_streq("single_selection", property))
368 return eina_value_bool_new(pd->single_selection); 368 return eina_value_bool_new(pd->single_selection);
369 // Last selected child 369 // Last selected child
370 if (!strcmp("child.selected", property)) 370 if (eina_streq("child.selected", property))
371 { 371 {
372 if (pd->none) 372 if (pd->none)
373 return eina_value_error_new(EFL_MODEL_ERROR_INCORRECT_VALUE); 373 return eina_value_error_new(EFL_MODEL_ERROR_INCORRECT_VALUE);
@@ -375,7 +375,7 @@ _efl_select_model_efl_model_property_get(const Eo *obj, Efl_Select_Model_Data *p
375 return eina_value_ulong_new(pd->last); 375 return eina_value_ulong_new(pd->last);
376 } 376 }
377 // Redirect to are we ourself selected 377 // Redirect to are we ourself selected
378 if (pd->parent && !strcmp("self.selected", property)) 378 if (pd->parent && eina_streq("self.selected", property))
379 { 379 {
380 return efl_model_property_get(efl_super(obj, EFL_SELECT_MODEL_CLASS), "selected"); 380 return efl_model_property_get(efl_super(obj, EFL_SELECT_MODEL_CLASS), "selected");
381 } 381 }
diff --git a/src/lib/eio/efl_io_model.c b/src/lib/eio/efl_io_model.c
index 3513852145..824a27c8a8 100644
--- a/src/lib/eio/efl_io_model.c
+++ b/src/lib/eio/efl_io_model.c
@@ -66,7 +66,7 @@ _already_added(Efl_Io_Model_Data *pd, const char *path)
66 66
67 EINA_LIST_FOREACH(pd->files, node, mi) 67 EINA_LIST_FOREACH(pd->files, node, mi)
68 { 68 {
69 if (!strcmp(mi->path, path)) 69 if (eina_streq(mi->path, path))
70 return EINA_TRUE; 70 return EINA_TRUE;
71 } 71 }
72 return EINA_FALSE; 72 return EINA_FALSE;
@@ -99,7 +99,7 @@ _efl_model_evt_added_ecore_cb(void *data, int type, void *event)
99 obj = pd->self; 99 obj = pd->self;
100 100
101 path = ecore_file_dir_get(ev->filename); 101 path = ecore_file_dir_get(ev->filename);
102 if (strcmp(pd->path, path) != 0) 102 if (!eina_streq(pd->path, path))
103 goto end; 103 goto end;
104 104
105 spath = eina_stringshare_add(ev->filename); 105 spath = eina_stringshare_add(ev->filename);
@@ -698,7 +698,7 @@ _efl_io_model_efl_model_property_get(const Eo *obj, Efl_Io_Model_Data *pd, const
698 698
699 for (i = 0; i < EINA_C_ARRAY_LENGTH(properties); ++i) 699 for (i = 0; i < EINA_C_ARRAY_LENGTH(properties); ++i)
700 if (property == properties[i].name || 700 if (property == properties[i].name ||
701 !strcmp(property, properties[i].name)) 701 eina_streq(property, properties[i].name))
702 return properties[i].cb(obj, pd); 702 return properties[i].cb(obj, pd);
703 703
704 return efl_model_property_get(efl_super(obj, EFL_IO_MODEL_CLASS), property); 704 return efl_model_property_get(efl_super(obj, EFL_IO_MODEL_CLASS), property);
@@ -718,7 +718,7 @@ _efl_io_model_efl_model_property_set(Eo *obj,
718 if (!property) goto on_error; 718 if (!property) goto on_error;
719 719
720 err = EFL_MODEL_ERROR_NOT_SUPPORTED; 720 err = EFL_MODEL_ERROR_NOT_SUPPORTED;
721 if (strcmp(property, "path") != 0) goto on_error; 721 if (!eina_streq(property, "path")) goto on_error;
722 722
723 if (finalized && pd->request.move) goto on_error; 723 if (finalized && pd->request.move) goto on_error;
724 724
diff --git a/src/lib/eldbus/eldbus_model.c b/src/lib/eldbus/eldbus_model.c
index ff37b60905..3fc4e66fcb 100644
--- a/src/lib/eldbus/eldbus_model.c
+++ b/src/lib/eldbus/eldbus_model.c
@@ -121,7 +121,7 @@ _eldbus_model_efl_model_property_set(Eo *obj,
121{ 121{
122 Eina_Error err = EFL_MODEL_ERROR_READ_ONLY; 122 Eina_Error err = EFL_MODEL_ERROR_READ_ONLY;
123 123
124 if (strcmp(property, UNIQUE_NAME_PROPERTY)) 124 if (!eina_streq(property, UNIQUE_NAME_PROPERTY))
125 err = EFL_MODEL_ERROR_NOT_FOUND; 125 err = EFL_MODEL_ERROR_NOT_FOUND;
126 return efl_loop_future_rejected(obj, err); 126 return efl_loop_future_rejected(obj, err);
127} 127}
@@ -133,7 +133,7 @@ _eldbus_model_efl_model_property_get(const Eo *obj,
133{ 133{
134 DBG("(%p): property=%s", obj, property); 134 DBG("(%p): property=%s", obj, property);
135 135
136 if (strcmp(property, UNIQUE_NAME_PROPERTY) != 0) goto on_error; 136 if (!eina_streq(property, UNIQUE_NAME_PROPERTY)) goto on_error;
137 137
138 if (!pd->connection) eldbus_model_connect_do(pd); 138 if (!pd->connection) eldbus_model_connect_do(pd);
139 139
diff --git a/src/lib/eldbus/eldbus_model_object.c b/src/lib/eldbus/eldbus_model_object.c
index 11896292c1..aa3d9b4fac 100644
--- a/src/lib/eldbus/eldbus_model_object.c
+++ b/src/lib/eldbus/eldbus_model_object.c
@@ -167,7 +167,7 @@ _eldbus_model_object_concatenate_path(const char *root_path,
167 const char *relative_path) 167 const char *relative_path)
168{ 168{
169 Eina_Strbuf *buffer; 169 Eina_Strbuf *buffer;
170 const char *format = (strcmp(root_path, "/") != 0) ? "%s/%s" : "%s%s"; 170 const char *format = (!eina_streq(root_path, "/")) ? "%s/%s" : "%s%s";
171 char *absolute_path = NULL; 171 char *absolute_path = NULL;
172 172
173 buffer = eina_strbuf_new(); 173 buffer = eina_strbuf_new();
diff --git a/src/lib/elementary/efl_ui_average_model.c b/src/lib/elementary/efl_ui_average_model.c
index 20e1da2c57..7ee9a6fb3a 100644
--- a/src/lib/elementary/efl_ui_average_model.c
+++ b/src/lib/elementary/efl_ui_average_model.c
@@ -115,14 +115,14 @@ _efl_ui_average_model_efl_model_property_set(Eo *obj, Efl_Ui_Average_Model_Data
115 if (!pd->parent) goto end; 115 if (!pd->parent) goto end;
116 116
117 // In vertical list mode we do not need to compute the average width size 117 // In vertical list mode we do not need to compute the average width size
118 /* if (!strcmp(property, _efl_model_property_selfw)) */ 118 /* if (eina_streq(property, _efl_model_property_selfw)) */
119 /* { */ 119 /* { */
120 /* f = _efl_ui_average_model_prepare(obj, &pd->parent->total.width, */ 120 /* f = _efl_ui_average_model_prepare(obj, &pd->parent->total.width, */
121 /* pd->wseen ? NULL : &pd->parent->total.wseen, */ 121 /* pd->wseen ? NULL : &pd->parent->total.wseen, */
122 /* property, value, EINA_TRUE); */ 122 /* property, value, EINA_TRUE); */
123 /* pd->wseen = EINA_TRUE; */ 123 /* pd->wseen = EINA_TRUE; */
124 /* } */ 124 /* } */
125 if (!strcmp(property, _efl_model_property_selfh)) 125 if (eina_streq(property, _efl_model_property_selfh))
126 { 126 {
127 f = _efl_ui_average_model_prepare(obj, &pd->parent->total.height, 127 f = _efl_ui_average_model_prepare(obj, &pd->parent->total.height,
128 pd->hseen ? NULL : &pd->parent->total.hseen, 128 pd->hseen ? NULL : &pd->parent->total.hseen,
@@ -167,10 +167,10 @@ _efl_ui_average_model_efl_model_property_get(const Eo *obj, Efl_Ui_Average_Model
167 t = eina_value_type_get(r); 167 t = eina_value_type_get(r);
168 if (t == EINA_VALUE_TYPE_UINT) 168 if (t == EINA_VALUE_TYPE_UINT)
169 { 169 {
170 if (!strcmp(property, _efl_model_property_totalh)) 170 if (eina_streq(property, _efl_model_property_totalh))
171 r = _efl_ui_average_model_compute(obj, r, pd->total.height, pd->total.hseen); 171 r = _efl_ui_average_model_compute(obj, r, pd->total.height, pd->total.hseen);
172 // We do not need to average the width in vertical list mode as this is done by the parent class 172 // We do not need to average the width in vertical list mode as this is done by the parent class
173 /* if (!strcmp(property, _efl_model_property_totalw)) */ 173 /* if (eina_streq(property, _efl_model_property_totalw)) */
174 /* r = _efl_ui_average_model_compute(obj, r, pd->total.width, pd->total.wseen); */ 174 /* r = _efl_ui_average_model_compute(obj, r, pd->total.width, pd->total.wseen); */
175 } 175 }
176 176
diff --git a/src/lib/elementary/efl_ui_exact_model.c b/src/lib/elementary/efl_ui_exact_model.c
index fac8298745..eba69854b9 100644
--- a/src/lib/elementary/efl_ui_exact_model.c
+++ b/src/lib/elementary/efl_ui_exact_model.c
@@ -237,7 +237,7 @@ _efl_ui_exact_model_efl_model_property_set(Eo *obj, Efl_Ui_Exact_Model_Data *pd,
237{ 237{
238 if (pd->parent) 238 if (pd->parent)
239 { 239 {
240 if (!strcmp(property, _efl_model_property_selfw)) 240 if (eina_streq(property, _efl_model_property_selfw))
241 { 241 {
242 unsigned int index; 242 unsigned int index;
243 unsigned char found; 243 unsigned char found;
@@ -251,7 +251,7 @@ _efl_ui_exact_model_efl_model_property_set(Eo *obj, Efl_Ui_Exact_Model_Data *pd,
251 pd->parent->total_size.width = pd->parent->slot[found].width[index % EFL_UI_EXACT_MODEL_CONTENT]; 251 pd->parent->total_size.width = pd->parent->slot[found].width[index % EFL_UI_EXACT_MODEL_CONTENT];
252 return efl_loop_future_resolved(obj, eina_value_uint_init(pd->parent->slot[found].width[index % EFL_UI_EXACT_MODEL_CONTENT])); 252 return efl_loop_future_resolved(obj, eina_value_uint_init(pd->parent->slot[found].width[index % EFL_UI_EXACT_MODEL_CONTENT]));
253 } 253 }
254 if (!strcmp(property, _efl_model_property_selfh)) 254 if (eina_streq(property, _efl_model_property_selfh))
255 { 255 {
256 unsigned int old_value; 256 unsigned int old_value;
257 unsigned int index; 257 unsigned int index;
@@ -267,23 +267,23 @@ _efl_ui_exact_model_efl_model_property_set(Eo *obj, Efl_Ui_Exact_Model_Data *pd,
267 return efl_loop_future_resolved(obj, eina_value_uint_init(pd->parent->slot[found].height[index % EFL_UI_EXACT_MODEL_CONTENT])); 267 return efl_loop_future_resolved(obj, eina_value_uint_init(pd->parent->slot[found].height[index % EFL_UI_EXACT_MODEL_CONTENT]));
268 } 268 }
269 // The following property are calculated by the model and so READ_ONLY 269 // The following property are calculated by the model and so READ_ONLY
270 if (!strcmp(property, _efl_model_property_totalh)) 270 if (eina_streq(property, _efl_model_property_totalh))
271 { 271 {
272 return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY); 272 return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY);
273 } 273 }
274 if (!strcmp(property, _efl_model_property_totalw)) 274 if (eina_streq(property, _efl_model_property_totalw))
275 { 275 {
276 return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY); 276 return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY);
277 } 277 }
278 } 278 }
279 279
280 if (!strcmp(property, _efl_model_property_itemw)) 280 if (eina_streq(property, _efl_model_property_itemw))
281 { 281 {
282 // The exact model can not guess a general item size if asked 282 // The exact model can not guess a general item size if asked
283 // and should refuse to remember anything like that. 283 // and should refuse to remember anything like that.
284 return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY); 284 return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY);
285 } 285 }
286 if (!strcmp(property, _efl_model_property_itemh)) 286 if (eina_streq(property, _efl_model_property_itemh))
287 { 287 {
288 // The exact model can not guess a general item size if asked 288 // The exact model can not guess a general item size if asked
289 // and should refuse to remember anything like that. 289 // and should refuse to remember anything like that.
@@ -299,7 +299,7 @@ _efl_ui_exact_model_efl_model_property_get(const Eo *obj, Efl_Ui_Exact_Model_Dat
299{ 299{
300 if (pd->parent) 300 if (pd->parent)
301 { 301 {
302 if (!strcmp(property, _efl_model_property_selfw)) 302 if (eina_streq(property, _efl_model_property_selfw))
303 { 303 {
304 unsigned int index; 304 unsigned int index;
305 unsigned char found; 305 unsigned char found;
@@ -308,7 +308,7 @@ _efl_ui_exact_model_efl_model_property_get(const Eo *obj, Efl_Ui_Exact_Model_Dat
308 found = _efl_ui_exact_model_slot_find(pd, index, EINA_TRUE, EINA_FALSE); 308 found = _efl_ui_exact_model_slot_find(pd, index, EINA_TRUE, EINA_FALSE);
309 return eina_value_uint_new(pd->parent->slot[found].width[index % EFL_UI_EXACT_MODEL_CONTENT]); 309 return eina_value_uint_new(pd->parent->slot[found].width[index % EFL_UI_EXACT_MODEL_CONTENT]);
310 } 310 }
311 if (!strcmp(property, _efl_model_property_selfh)) 311 if (eina_streq(property, _efl_model_property_selfh))
312 { 312 {
313 unsigned int index; 313 unsigned int index;
314 unsigned char found; 314 unsigned char found;
@@ -318,20 +318,20 @@ _efl_ui_exact_model_efl_model_property_get(const Eo *obj, Efl_Ui_Exact_Model_Dat
318 return eina_value_uint_new(pd->parent->slot[found].height[index % EFL_UI_EXACT_MODEL_CONTENT]); 318 return eina_value_uint_new(pd->parent->slot[found].height[index % EFL_UI_EXACT_MODEL_CONTENT]);
319 } 319 }
320 } 320 }
321 if (!strcmp(property, _efl_model_property_totalh)) 321 if (eina_streq(property, _efl_model_property_totalh))
322 { 322 {
323 return eina_value_uint_new(pd->total_size.height); 323 return eina_value_uint_new(pd->total_size.height);
324 } 324 }
325 if (!strcmp(property, _efl_model_property_totalw)) 325 if (eina_streq(property, _efl_model_property_totalw))
326 { 326 {
327 return eina_value_uint_new(pd->total_size.width); 327 return eina_value_uint_new(pd->total_size.width);
328 } 328 }
329 if (!strcmp(property, _efl_model_property_itemw)) 329 if (eina_streq(property, _efl_model_property_itemw))
330 { 330 {
331 // The exact model can not guess a general item size if asked. 331 // The exact model can not guess a general item size if asked.
332 return eina_value_error_new(EAGAIN); 332 return eina_value_error_new(EAGAIN);
333 } 333 }
334 if (!strcmp(property, _efl_model_property_itemh)) 334 if (eina_streq(property, _efl_model_property_itemh))
335 { 335 {
336 // The exact model can not guess a general item size if asked. 336 // The exact model can not guess a general item size if asked.
337 return eina_value_error_new(EAGAIN); 337 return eina_value_error_new(EAGAIN);
diff --git a/src/lib/elementary/efl_ui_homogeneous_model.c b/src/lib/elementary/efl_ui_homogeneous_model.c
index 2aaf90431b..646c59020d 100644
--- a/src/lib/elementary/efl_ui_homogeneous_model.c
+++ b/src/lib/elementary/efl_ui_homogeneous_model.c
@@ -46,25 +46,25 @@ _efl_ui_homogeneous_model_efl_model_property_set(Eo *obj,
46{ 46{
47 if (pd->parent) 47 if (pd->parent)
48 { 48 {
49 if (!strcmp(property, _efl_model_property_selfw)) 49 if (eina_streq(property, _efl_model_property_selfw))
50 return _efl_ui_homogeneous_model_property_set(obj, value, 50 return _efl_ui_homogeneous_model_property_set(obj, value,
51 &pd->parent->item.defined.width, 51 &pd->parent->item.defined.width,
52 &pd->parent->item.width); 52 &pd->parent->item.width);
53 if (!strcmp(property, _efl_model_property_selfh)) 53 if (eina_streq(property, _efl_model_property_selfh))
54 return _efl_ui_homogeneous_model_property_set(obj, value, 54 return _efl_ui_homogeneous_model_property_set(obj, value,
55 &pd->parent->item.defined.height, 55 &pd->parent->item.defined.height,
56 &pd->parent->item.height); 56 &pd->parent->item.height);
57 if (!strcmp(property, _efl_model_property_totalw) || 57 if (eina_streq(property, _efl_model_property_totalw) ||
58 !strcmp(property, _efl_model_property_totalh)) 58 eina_streq(property, _efl_model_property_totalh))
59 return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY); 59 return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY);
60 } 60 }
61 if (!strcmp(property, _efl_model_property_itemw)) 61 if (eina_streq(property, _efl_model_property_itemw))
62 { 62 {
63 return _efl_ui_homogeneous_model_property_set(obj, value, 63 return _efl_ui_homogeneous_model_property_set(obj, value,
64 &pd->item.defined.width, 64 &pd->item.defined.width,
65 &pd->item.width); 65 &pd->item.width);
66 } 66 }
67 if (!strcmp(property, _efl_model_property_itemh)) 67 if (eina_streq(property, _efl_model_property_itemh))
68 { 68 {
69 return _efl_ui_homogeneous_model_property_set(obj, value, 69 return _efl_ui_homogeneous_model_property_set(obj, value,
70 &pd->item.defined.height, 70 &pd->item.defined.height,
@@ -82,39 +82,39 @@ _efl_ui_homogeneous_model_efl_model_property_get(const Eo *obj,
82{ 82{
83 if (pd->parent) 83 if (pd->parent)
84 { 84 {
85 if (!strcmp(property, _efl_model_property_selfw)) 85 if (eina_streq(property, _efl_model_property_selfw))
86 { 86 {
87 if (pd->parent->item.defined.width) 87 if (pd->parent->item.defined.width)
88 return eina_value_uint_new(pd->parent->item.width); 88 return eina_value_uint_new(pd->parent->item.width);
89 goto not_ready; 89 goto not_ready;
90 } 90 }
91 if (!strcmp(property, _efl_model_property_selfh)) 91 if (eina_streq(property, _efl_model_property_selfh))
92 { 92 {
93 if (pd->parent->item.defined.height) 93 if (pd->parent->item.defined.height)
94 return eina_value_uint_new(pd->parent->item.height); 94 return eina_value_uint_new(pd->parent->item.height);
95 goto not_ready; 95 goto not_ready;
96 } 96 }
97 } 97 }
98 if (!strcmp(property, _efl_model_property_itemw)) 98 if (eina_streq(property, _efl_model_property_itemw))
99 { 99 {
100 if (pd->item.defined.width) 100 if (pd->item.defined.width)
101 return eina_value_uint_new(pd->item.width); 101 return eina_value_uint_new(pd->item.width);
102 goto not_ready; 102 goto not_ready;
103 } 103 }
104 if (!strcmp(property, _efl_model_property_itemh)) 104 if (eina_streq(property, _efl_model_property_itemh))
105 { 105 {
106 if (pd->item.defined.height) 106 if (pd->item.defined.height)
107 return eina_value_uint_new(pd->item.height); 107 return eina_value_uint_new(pd->item.height);
108 goto not_ready; 108 goto not_ready;
109 } 109 }
110 if (!strcmp(property, _efl_model_property_totalh)) 110 if (eina_streq(property, _efl_model_property_totalh))
111 { 111 {
112 if (pd->item.defined.height) 112 if (pd->item.defined.height)
113 return eina_value_uint_new(pd->item.height * 113 return eina_value_uint_new(pd->item.height *
114 efl_model_children_count_get(obj)); 114 efl_model_children_count_get(obj));
115 goto not_ready; 115 goto not_ready;
116 } 116 }
117 if (!strcmp(property, _efl_model_property_totalw)) 117 if (eina_streq(property, _efl_model_property_totalw))
118 { 118 {
119 if (pd->item.defined.width) 119 if (pd->item.defined.width)
120 // We only handle vertical list at this point, so total width is the width of one item. 120 // We only handle vertical list at this point, so total width is the width of one item.