diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-08-30 13:56:14 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-09-04 12:05:15 +0300 |
commit | 3b93b48112dbb3339e4c458bbd9591b76e1af1e5 (patch) | |
tree | a690f222834dd450df25f97d3d4168e5f43557ee /src/resolver.c | |
parent | dcba9d915ef9b4a6d38a05c2e900cce96e035d89 (diff) | |
download | connman-3b93b48112dbb3339e4c458bbd9591b76e1af1e5.tar.gz connman-3b93b48112dbb3339e4c458bbd9591b76e1af1e5.tar.bz2 connman-3b93b48112dbb3339e4c458bbd9591b76e1af1e5.zip |
Use g_slist_prepend() where appropriate
Convert usage of g_slist_append() to g_slist_prepend() where
appropriate. gdbus, dnsproxy, resolver, rtnl, session and session
unit test have ordering requirements and thus not touched.
Diffstat (limited to 'src/resolver.c')
-rw-r--r-- | src/resolver.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/resolver.c b/src/resolver.c index a9d13412..2d524573 100644 --- a/src/resolver.c +++ b/src/resolver.c @@ -244,7 +244,7 @@ static gboolean resolver_expire_cb(gpointer user_data) DBG("interface %s domain %s server %s", entry->interface, entry->domain, entry->server); - list = g_slist_append(NULL, entry); + list = g_slist_prepend(NULL, entry); index = connman_inet_ifindex(entry->interface); if (index >= 0) { @@ -462,7 +462,7 @@ int connman_resolver_remove(const char *interface, const char *domain, if (g_strcmp0(entry->server, server) != 0) continue; - matches = g_slist_append(matches, entry); + matches = g_slist_prepend(matches, entry); break; } @@ -495,7 +495,7 @@ int connman_resolver_remove_all(const char *interface) if (g_strcmp0(entry->interface, interface) != 0) continue; - matches = g_slist_append(matches, entry); + matches = g_slist_prepend(matches, entry); } if (matches == NULL) |