aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-07-24 09:00:35 +0200
committerTobias Brunner <tobias@strongswan.org>2013-07-24 10:54:47 +0200
commit0c76d820dc88a3019fbb7bd4a2cf0824cf71c13b (patch)
tree6ed96ca100cce421f6ecd5b613b18ff48da5712c /src
parentcfdd23b96710dbfe94d5d3f5bb9c23afa0b80e98 (diff)
downloadstrongswan-0c76d820dc88a3019fbb7bd4a2cf0824cf71c13b.tar.bz2
strongswan-0c76d820dc88a3019fbb7bd4a2cf0824cf71c13b.tar.xz
tnc-ifmap: Use proper cast for length when using %.*s
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/plugins/tnc_ifmap/tnc_ifmap_http.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_http.c b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_http.c
index 9105b7b4d..001a3fbee 100644
--- a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_http.c
+++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_http.c
@@ -75,7 +75,7 @@ METHOD(tnc_ifmap_http_t, build, status_t,
if (this->user_pass.len)
{
snprintf(auth, sizeof(auth), "Authorization: Basic %.*s\r\n",
- this->user_pass.len, this->user_pass.ptr);
+ (int)this->user_pass.len, this->user_pass.ptr);
}
else
{
@@ -90,7 +90,8 @@ METHOD(tnc_ifmap_http_t, build, status_t,
"Content-Type: application/soap+xml;charset=utf-8\r\n"
"Content-Length: %d\r\n"
"\r\n"
- "%.*s", path, (path-host), host, auth, in->len, in->len, in->ptr);
+ "%.*s", path, (int)(path-host), host, auth, (int)in->len,
+ (int)in->len, in->ptr);
free(host);
if (len == -1)
@@ -120,7 +121,7 @@ static bool process_header(chunk_t *in, bool *chunked, u_int *content_len)
{
DBG1(DBG_TNC, "http response returns error code %d", code);
return FALSE;
- }
+ }
*content_len = 0;
*chunked = FALSE;
@@ -196,12 +197,12 @@ METHOD(tnc_ifmap_http_t, process, status_t,
{
out_chunk = *in;
out_chunk.len = len;
- *out = chunk_cat("mc", *out, out_chunk);
+ *out = chunk_cat("mc", *out, out_chunk);
*in = chunk_skip(*in, len);
if (!fetchline(in, &line) || line.len > 0)
{
return FAILED;
- }
+ }
}
else
{