summaryrefslogtreecommitdiff
path: root/src/lib/eldbus
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 /src/lib/eldbus
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
Diffstat (limited to 'src/lib/eldbus')
-rw-r--r--src/lib/eldbus/eldbus_model.c4
-rw-r--r--src/lib/eldbus/eldbus_model_object.c2
2 files changed, 3 insertions, 3 deletions
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();