summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modem.c b/src/modem.c
index c41e352e..9dc7784a 100644
--- a/src/modem.c
+++ b/src/modem.c
@@ -857,13 +857,13 @@ const char **__ofono_modem_get_list()
modems = g_new0(const char *, g_slist_length(g_modem_list) + 1);
- for (l = g_modem_list, i = 0; l; l = l->next, i++) {
+ for (l = g_modem_list, i = 0; l; l = l->next) {
modem = l->data;
if (modem->driver == NULL)
continue;
- modems[i] = modem->path;
+ modems[i++] = modem->path;
}
return modems;