diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-10-12 14:11:57 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2007-10-12 14:11:57 +0200 |
commit | f618a4a446d9de22298f45edba53eadf87129efc (patch) | |
tree | c3f23b53aa84f43248ddd5e6618f710da0408e67 /lib/proxy.c | |
parent | c78c03298b5fd99999dcafeb1e1c377a62d03019 (diff) |
Fix GCC warning.
Diffstat (limited to 'lib/proxy.c')
-rw-r--r-- | lib/proxy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/proxy.c b/lib/proxy.c index 7911b06f..dff5d0a4 100644 --- a/lib/proxy.c +++ b/lib/proxy.c @@ -210,7 +210,7 @@ static gboolean http_canwrite(gpointer data, gint source, b_input_condition cond return FALSE; } - if (proxyuser && *proxyuser) { + if (strlen(proxyuser) > 0) { char *t1, *t2; t1 = g_strdup_printf("%s:%s", proxyuser, proxypass); t2 = tobase64(t1); @@ -538,7 +538,7 @@ int proxy_connect(const char *host, int port, b_event_handler func, gpointer dat phb->func = func; phb->data = data; - if ((proxytype == PROXY_NONE) || !proxyhost || !proxyhost[0] || !proxyport || (proxyport == -1)) + if ((proxytype == PROXY_NONE) || strlen(proxyhost) > 0 || !proxyport || (proxyport == -1)) return proxy_connect_none(host, port, phb); else if (proxytype == PROXY_HTTP) return proxy_connect_http(host, port, phb); |