summaryrefslogtreecommitdiffstats
path: root/src/manager.c
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2010-02-10 15:53:05 -0800
committerDenis Kenzior <denkenz@gmail.com>2010-02-10 18:06:46 -0600
commit8b54792cddd8e380b3a8a36636af7f8a665bef10 (patch)
tree79fccba59ae70a5951a66391c89ec75eee4a7f61 /src/manager.c
parentc4073fca00579403ec94b228c5a5fc9e22e0c7d9 (diff)
downloadofono-8b54792cddd8e380b3a8a36636af7f8a665bef10.tar.bz2
Clean: no error path needed
Remove unneeded error path and document the rationale behind it in __ofono_modem_get_list() and manager_get_properties().
Diffstat (limited to 'src/manager.c')
-rw-r--r--src/manager.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/manager.c b/src/manager.c
index 593149c5..657f3faa 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -29,6 +29,10 @@
#include "ofono.h"
+/*
+ * Note __ofono_modem_get_list() will abort if it cannot allocate
+ * memory; so no error path or cleanup is needed.
+ */
static DBusMessage *manager_get_properties(DBusConnection *conn,
DBusMessage *msg, void *data)
{
@@ -43,9 +47,6 @@ static DBusMessage *manager_get_properties(DBusConnection *conn,
modems = __ofono_modem_get_list();
- if (!modems)
- return NULL;
-
dbus_message_iter_init_append(reply, &iter);
dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY,