summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8a326cc)
raw | patch | inline | side by side (parent: 8a326cc)
author | Dan Fandrich <dan@coneharvesters.com> | |
Sat, 2 Feb 2013 00:19:48 +0000 (01:19 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Sun, 3 Feb 2013 10:10:05 +0000 (11:10 +0100) |
This can affect portability to some architectures.
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
src/apache.c | patch | blob | history | |
src/ascent.c | patch | blob | history | |
src/bind.c | patch | blob | history | |
src/curl.c | patch | blob | history | |
src/curl_json.c | patch | blob | history | |
src/curl_xml.c | patch | blob | history | |
src/nginx.c | patch | blob | history | |
src/write_http.c | patch | blob | history |
diff --git a/src/apache.c b/src/apache.c
index 5f5441ff4ed7b9b4ff78b7bbce00d63333b0b6be..33ee1305caea62dbdd5acfc86c99d094b092f68c 100644 (file)
--- a/src/apache.c
+++ b/src/apache.c
return (-1);
}
- curl_easy_setopt (st->curl, CURLOPT_NOSIGNAL, 1);
+ curl_easy_setopt (st->curl, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt (st->curl, CURLOPT_WRITEFUNCTION, apache_curl_callback);
curl_easy_setopt (st->curl, CURLOPT_WRITEDATA, st);
}
curl_easy_setopt (st->curl, CURLOPT_URL, st->url);
- curl_easy_setopt (st->curl, CURLOPT_FOLLOWLOCATION, 1);
+ curl_easy_setopt (st->curl, CURLOPT_FOLLOWLOCATION, 1L);
if (st->verify_peer != 0)
{
- curl_easy_setopt (st->curl, CURLOPT_SSL_VERIFYPEER, 1);
+ curl_easy_setopt (st->curl, CURLOPT_SSL_VERIFYPEER, 1L);
}
else
{
- curl_easy_setopt (st->curl, CURLOPT_SSL_VERIFYPEER, 0);
+ curl_easy_setopt (st->curl, CURLOPT_SSL_VERIFYPEER, 0L);
}
if (st->verify_host != 0)
{
- curl_easy_setopt (st->curl, CURLOPT_SSL_VERIFYHOST, 2);
+ curl_easy_setopt (st->curl, CURLOPT_SSL_VERIFYHOST, 2L);
}
else
{
- curl_easy_setopt (st->curl, CURLOPT_SSL_VERIFYHOST, 0);
+ curl_easy_setopt (st->curl, CURLOPT_SSL_VERIFYHOST, 0L);
}
if (st->cacert != NULL)
diff --git a/src/ascent.c b/src/ascent.c
index 993e480cb1746b0464741967eb6340921365ca7b..3a7c393963b8368d605fa0497e82f1feffd2c837 100644 (file)
--- a/src/ascent.c
+++ b/src/ascent.c
return (-1);
}
- curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1);
+ curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, ascent_curl_callback);
curl_easy_setopt (curl, CURLOPT_USERAGENT, PACKAGE_NAME"/"PACKAGE_VERSION);
curl_easy_setopt (curl, CURLOPT_ERRORBUFFER, ascent_curl_error);
}
curl_easy_setopt (curl, CURLOPT_URL, url);
- curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1);
+ curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1L);
if ((verify_peer == NULL) || IS_TRUE (verify_peer))
- curl_easy_setopt (curl, CURLOPT_SSL_VERIFYPEER, 1);
+ curl_easy_setopt (curl, CURLOPT_SSL_VERIFYPEER, 1L);
else
- curl_easy_setopt (curl, CURLOPT_SSL_VERIFYPEER, 0);
+ curl_easy_setopt (curl, CURLOPT_SSL_VERIFYPEER, 0L);
if ((verify_host == NULL) || IS_TRUE (verify_host))
- curl_easy_setopt (curl, CURLOPT_SSL_VERIFYHOST, 2);
+ curl_easy_setopt (curl, CURLOPT_SSL_VERIFYHOST, 2L);
else
- curl_easy_setopt (curl, CURLOPT_SSL_VERIFYHOST, 0);
+ curl_easy_setopt (curl, CURLOPT_SSL_VERIFYHOST, 0L);
if (cacert != NULL)
curl_easy_setopt (curl, CURLOPT_CAINFO, cacert);
diff --git a/src/bind.c b/src/bind.c
index 28c1e56a74c880bb170d9d6efbfc7b2b0542ea80..c00f5ae9e28c9e9bb48b931f0f64571835341a05 100644 (file)
--- a/src/bind.c
+++ b/src/bind.c
return (-1);
}
- curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1);
+ curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, bind_curl_callback);
curl_easy_setopt (curl, CURLOPT_USERAGENT, PACKAGE_NAME"/"PACKAGE_VERSION);
curl_easy_setopt (curl, CURLOPT_ERRORBUFFER, bind_curl_error);
curl_easy_setopt (curl, CURLOPT_URL, (url != NULL) ? url : BIND_DEFAULT_URL);
- curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1);
+ curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1L);
return (0);
} /* }}} int bind_init */
diff --git a/src/curl.c b/src/curl.c
index 31cda39a2514f8d0a1993d4482e8525dbdb35cb0..214fb519e03322c479f67dd57ebf24993c960559 100644 (file)
--- a/src/curl.c
+++ b/src/curl.c
return (-1);
}
- curl_easy_setopt (wp->curl, CURLOPT_NOSIGNAL, 1);
+ curl_easy_setopt (wp->curl, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt (wp->curl, CURLOPT_WRITEFUNCTION, cc_curl_callback);
curl_easy_setopt (wp->curl, CURLOPT_WRITEDATA, wp);
curl_easy_setopt (wp->curl, CURLOPT_USERAGENT,
PACKAGE_NAME"/"PACKAGE_VERSION);
curl_easy_setopt (wp->curl, CURLOPT_ERRORBUFFER, wp->curl_errbuf);
curl_easy_setopt (wp->curl, CURLOPT_URL, wp->url);
- curl_easy_setopt (wp->curl, CURLOPT_FOLLOWLOCATION, 1);
+ curl_easy_setopt (wp->curl, CURLOPT_FOLLOWLOCATION, 1L);
if (wp->user != NULL)
{
curl_easy_setopt (wp->curl, CURLOPT_USERPWD, wp->credentials);
}
- curl_easy_setopt (wp->curl, CURLOPT_SSL_VERIFYPEER, wp->verify_peer);
+ curl_easy_setopt (wp->curl, CURLOPT_SSL_VERIFYPEER, (long) wp->verify_peer);
curl_easy_setopt (wp->curl, CURLOPT_SSL_VERIFYHOST,
- wp->verify_host ? 2 : 0);
+ wp->verify_host ? 2L : 0L);
if (wp->cacert != NULL)
curl_easy_setopt (wp->curl, CURLOPT_CAINFO, wp->cacert);
diff --git a/src/curl_json.c b/src/curl_json.c
index 968fc93c3214cf36fd08acedbdf57dc2a60a0948..51c1b2ed75604ab84c6e13af25dd9a15c5a14f92 100644 (file)
--- a/src/curl_json.c
+++ b/src/curl_json.c
return (-1);
}
- curl_easy_setopt (db->curl, CURLOPT_NOSIGNAL, 1);
+ curl_easy_setopt (db->curl, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt (db->curl, CURLOPT_WRITEFUNCTION, cj_curl_callback);
curl_easy_setopt (db->curl, CURLOPT_WRITEDATA, db);
curl_easy_setopt (db->curl, CURLOPT_USERAGENT,
curl_easy_setopt (db->curl, CURLOPT_USERPWD, db->credentials);
}
- curl_easy_setopt (db->curl, CURLOPT_SSL_VERIFYPEER, db->verify_peer);
+ curl_easy_setopt (db->curl, CURLOPT_SSL_VERIFYPEER, (long) db->verify_peer);
curl_easy_setopt (db->curl, CURLOPT_SSL_VERIFYHOST,
- db->verify_host ? 2 : 0);
+ db->verify_host ? 2L : 0L);
if (db->cacert != NULL)
curl_easy_setopt (db->curl, CURLOPT_CAINFO, db->cacert);
diff --git a/src/curl_xml.c b/src/curl_xml.c
index 46e0d490967456156863413912fe234deeb5abda..da90d7c8773256a2f1ae9dc1728de93343b8b3ff 100644 (file)
--- a/src/curl_xml.c
+++ b/src/curl_xml.c
return (-1);
}
- curl_easy_setopt (db->curl, CURLOPT_NOSIGNAL, 1);
+ curl_easy_setopt (db->curl, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt (db->curl, CURLOPT_WRITEFUNCTION, cx_curl_callback);
curl_easy_setopt (db->curl, CURLOPT_WRITEDATA, db);
curl_easy_setopt (db->curl, CURLOPT_USERAGENT,
diff --git a/src/nginx.c b/src/nginx.c
index d9529516331740741475b0baecacbc943af0700c..f1f3f99c38e684a3e669e109701cad3909054aed 100644 (file)
--- a/src/nginx.c
+++ b/src/nginx.c
return (-1);
}
- curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1);
+ curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, nginx_curl_callback);
curl_easy_setopt (curl, CURLOPT_USERAGENT, PACKAGE_NAME"/"PACKAGE_VERSION);
curl_easy_setopt (curl, CURLOPT_ERRORBUFFER, nginx_curl_error);
curl_easy_setopt (curl, CURLOPT_URL, url);
}
- curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1);
+ curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1L);
if ((verify_peer == NULL) || IS_TRUE (verify_peer))
{
- curl_easy_setopt (curl, CURLOPT_SSL_VERIFYPEER, 1);
+ curl_easy_setopt (curl, CURLOPT_SSL_VERIFYPEER, 1L);
}
else
{
- curl_easy_setopt (curl, CURLOPT_SSL_VERIFYPEER, 0);
+ curl_easy_setopt (curl, CURLOPT_SSL_VERIFYPEER, 0L);
}
if ((verify_host == NULL) || IS_TRUE (verify_host))
{
- curl_easy_setopt (curl, CURLOPT_SSL_VERIFYHOST, 2);
+ curl_easy_setopt (curl, CURLOPT_SSL_VERIFYHOST, 2L);
}
else
{
- curl_easy_setopt (curl, CURLOPT_SSL_VERIFYHOST, 0);
+ curl_easy_setopt (curl, CURLOPT_SSL_VERIFYHOST, 0L);
}
if (cacert != NULL)
diff --git a/src/write_http.c b/src/write_http.c
index 22b5842a85542633b77cd68739843f40bce132c7..e08594cda8b8504e0f386d05181c103352c85eca 100644 (file)
--- a/src/write_http.c
+++ b/src/write_http.c
return (-1);
}
- curl_easy_setopt (cb->curl, CURLOPT_NOSIGNAL, 1);
+ curl_easy_setopt (cb->curl, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt (cb->curl, CURLOPT_USERAGENT, PACKAGE_NAME"/"PACKAGE_VERSION);
headers = NULL;
curl_easy_setopt (cb->curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
}
- curl_easy_setopt (cb->curl, CURLOPT_SSL_VERIFYPEER, cb->verify_peer);
+ curl_easy_setopt (cb->curl, CURLOPT_SSL_VERIFYPEER, (long) cb->verify_peer);
curl_easy_setopt (cb->curl, CURLOPT_SSL_VERIFYHOST,
- cb->verify_host ? 2 : 0);
+ cb->verify_host ? 2L : 0L);
if (cb->cacert != NULL)
curl_easy_setopt (cb->curl, CURLOPT_CAINFO, cb->cacert);