summaryrefslogtreecommitdiff
path: root/src/proxy.c
diff options
context:
space:
mode:
authorZhang zhengguang <zhengguang.zhang@intel.com>2014-07-17 10:37:39 +0800
committerZhang zhengguang <zhengguang.zhang@intel.com>2014-07-17 10:37:39 +0800
commit1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7 (patch)
tree6e991827d28537f7f40f20786c2354fd04a9fdad /src/proxy.c
parentfbe905ab58ecc31fe64c410c5f580cadc30e7f04 (diff)
downloadconnman-1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7.tar.gz
connman-1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7.tar.bz2
connman-1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7.zip
Imported Upstream version 1.24upstream/1.24
Diffstat (limited to 'src/proxy.c')
-rw-r--r--src/proxy.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/proxy.c b/src/proxy.c
index b6775b67..0d1a25ab 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -69,7 +69,7 @@ static gboolean lookup_callback(gpointer user_data)
struct proxy_lookup *lookup = user_data;
GSList *list;
- if (lookup == NULL)
+ if (!lookup)
return FALSE;
lookup->watch = 0;
@@ -77,14 +77,14 @@ static gboolean lookup_callback(gpointer user_data)
for (list = driver_list; list; list = list->next) {
struct connman_proxy_driver *proxy = list->data;
- if (proxy->request_lookup == NULL)
+ if (!proxy->request_lookup)
continue;
lookup->proxy = proxy;
break;
}
- if (lookup->proxy == NULL ||
+ if (!lookup->proxy ||
lookup->proxy->request_lookup(lookup->service,
lookup->url) < 0) {
@@ -106,11 +106,11 @@ unsigned int connman_proxy_lookup(const char *interface, const char *url,
DBG("interface %s url %s", interface, url);
- if (interface == NULL)
+ if (!interface)
return 0;
lookup = g_try_new0(struct proxy_lookup, 1);
- if (lookup == NULL)
+ if (!lookup)
return 0;
lookup->token = next_lookup_token++;
@@ -149,14 +149,14 @@ void connman_proxy_lookup_cancel(unsigned int token)
lookup = NULL;
}
- if (lookup != NULL) {
+ if (lookup) {
if (lookup->watch > 0) {
g_source_remove(lookup->watch);
lookup->watch = 0;
}
- if (lookup->proxy != NULL &&
- lookup->proxy->cancel_lookup != NULL)
+ if (lookup->proxy &&
+ lookup->proxy->cancel_lookup)
lookup->proxy->cancel_lookup(lookup->service,
lookup->url);
@@ -165,7 +165,7 @@ void connman_proxy_lookup_cancel(unsigned int token)
}
void connman_proxy_driver_lookup_notify(struct connman_service *service,
- const char *url, const char *result)
+ const char *url, const char *result)
{
GSList *list, *matches = NULL;
@@ -185,7 +185,7 @@ void connman_proxy_driver_lookup_notify(struct connman_service *service,
}
}
- if (matches != NULL)
+ if (matches)
remove_lookups(matches);
}