summaryrefslogtreecommitdiff
path: root/legacy/edbus/src/lib/edbus_message.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-12-17 18:25:00 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2012-12-17 18:25:00 +0000
commit8cbd63de279cd121f728812af2f3b747fa12087a (patch)
tree9f940a7ae94f4d6721f42f53edaf0b3a7f387795 /legacy/edbus/src/lib/edbus_message.c
parentada326a184ea76b011051bccfe5baad3cf537942 (diff)
edbus: simplify end condition check in loop
SVN revision: 81175
Diffstat (limited to '')
-rw-r--r--legacy/edbus/src/lib/edbus_message.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/legacy/edbus/src/lib/edbus_message.c b/legacy/edbus/src/lib/edbus_message.c
index d1730f7e2a..ce8ac7b3bb 100644
--- a/legacy/edbus/src/lib/edbus_message.c
+++ b/legacy/edbus/src/lib/edbus_message.c
@@ -297,7 +297,13 @@ edbus_message_iter_arguments_vset(EDBus_Message_Iter *iter, const char *signatur
297 297
298 user_itr = va_arg(ap, EDBus_Message_Iter **); 298 user_itr = va_arg(ap, EDBus_Message_Iter **);
299 sub = _message_iterator_new(EINA_TRUE); 299 sub = _message_iterator_new(EINA_TRUE);
300 EINA_SAFETY_ON_NULL_GOTO(sub, error); 300 if (!sub)
301 {
302 ERR("Could not create sub iterator");
303 r = EINA_FALSE;
304 goto next;
305 }
306
301 iter->iterators = eina_inlist_append(iter->iterators, 307 iter->iterators = eina_inlist_append(iter->iterators,
302 EINA_INLIST_GET(sub)); 308 EINA_INLIST_GET(sub));
303 309
@@ -310,7 +316,8 @@ edbus_message_iter_arguments_vset(EDBus_Message_Iter *iter, const char *signatur
310 ERR("variant not supported by \ 316 ERR("variant not supported by \
311 edbus_message_iter_arguments_set(), \ 317 edbus_message_iter_arguments_set(), \
312 try edbus_message_iter_container_new()"); 318 try edbus_message_iter_container_new()");
313 goto error; 319 r = EINA_FALSE;
320 goto next;
314 } 321 }
315 else 322 else
316 { 323 {
@@ -326,14 +333,12 @@ edbus_message_iter_arguments_vset(EDBus_Message_Iter *iter, const char *signatur
326 *user_itr = sub; 333 *user_itr = sub;
327 } 334 }
328 335
336next:
329 dbus_free(type); 337 dbus_free(type);
330 if (!r || !dbus_signature_iter_next(&signature_iter)) break; 338 if (!r || !dbus_signature_iter_next(&signature_iter))
331 continue; 339 break;
332error:
333 r = EINA_FALSE;
334 dbus_free(type);
335 break;
336 } 340 }
341
337 return r; 342 return r;
338} 343}
339 344