X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fwrite_http.c;h=024dccc1c50b4752dccab2307cd70fc629f997a5;hp=87e518b6857605a814abed1460a014958dc016ec;hb=77ca1a45bab2f6adf9301723d0db68e5813a6d98;hpb=db42a25a488a12d46c2bb4dd721f62d3a0b18be7 diff --git a/src/write_http.c b/src/write_http.c index 87e518b6..024dccc1 100644 --- a/src/write_http.c +++ b/src/write_http.c @@ -228,7 +228,7 @@ static int wh_flush_nolock(cdtime_t timeout, wh_callback_t *cb) /* {{{ */ int status; DEBUG("write_http plugin: wh_flush_nolock: timeout = %.3f; " - "send_buffer_fill = %zu;", + "send_buffer_fill = %" PRIsz ";", CDTIME_T_TO_DOUBLE(timeout), cb->send_buffer_fill); /* timeout == 0 => flush unconditionally */ @@ -380,7 +380,7 @@ static int wh_write_command(const data_set_t *ds, CDTIME_T_TO_DOUBLE(vl->interval), values); if (command_len >= sizeof(command)) { ERROR("write_http plugin: Command buffer too small: " - "Need %zu bytes.", + "Need %" PRIsz " bytes.", command_len + 1); return -1; } @@ -410,8 +410,8 @@ static int wh_write_command(const data_set_t *ds, cb->send_buffer_fill += command_len; cb->send_buffer_free -= command_len; - DEBUG("write_http plugin: <%s> buffer %zu/%zu (%g%%) \"%s\"", cb->location, - cb->send_buffer_fill, cb->send_buffer_size, + DEBUG("write_http plugin: <%s> buffer %" PRIsz "/%" PRIsz " (%g%%) \"%s\"", + cb->location, cb->send_buffer_fill, cb->send_buffer_size, 100.0 * ((double)cb->send_buffer_fill) / ((double)cb->send_buffer_size), command); @@ -452,8 +452,8 @@ static int wh_write_json(const data_set_t *ds, const value_list_t *vl, /* {{{ */ return status; } - DEBUG("write_http plugin: <%s> buffer %zu/%zu (%g%%)", cb->location, - cb->send_buffer_fill, cb->send_buffer_size, + DEBUG("write_http plugin: <%s> buffer %" PRIsz "/%" PRIsz " (%g%%)", + cb->location, cb->send_buffer_fill, cb->send_buffer_size, 100.0 * ((double)cb->send_buffer_fill) / ((double)cb->send_buffer_size)); @@ -501,8 +501,8 @@ static int wh_write_kairosdb(const data_set_t *ds, return status; } - DEBUG("write_http plugin: <%s> buffer %zu/%zu (%g%%)", cb->location, - cb->send_buffer_fill, cb->send_buffer_size, + DEBUG("write_http plugin: <%s> buffer %" PRIsz "/%" PRIsz " (%g%%)", + cb->location, cb->send_buffer_fill, cb->send_buffer_size, 100.0 * ((double)cb->send_buffer_fill) / ((double)cb->send_buffer_size)); @@ -802,7 +802,8 @@ static int wh_config_node(oconfig_item_t *ci) /* {{{ */ /* Allocate the buffer. */ cb->send_buffer = malloc(cb->send_buffer_size); if (cb->send_buffer == NULL) { - ERROR("write_http plugin: malloc(%zu) failed.", cb->send_buffer_size); + ERROR("write_http plugin: malloc(%" PRIsz ") failed.", + cb->send_buffer_size); wh_callback_free(cb); return -1; }