summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5b0a792)
raw | patch | inline | side by side (parent: 5b0a792)
author | jaroug <jaroug@gmail.com> | |
Wed, 1 Mar 2017 19:07:23 +0000 (20:07 +0100) | ||
committer | jaroug <jaroug@gmail.com> | |
Wed, 1 Mar 2017 19:07:23 +0000 (20:07 +0100) |
src/utils_format_kairosdb.c | patch | blob | history | |
src/utils_format_kairosdb.h | patch | blob | history |
index a5d36990baffc9f69d0c20c9608779a232f3e78d..2a14f0edcd3476a6cce026503d8c146204f3f415 100644 (file)
const data_set_t *ds, const value_list_t *vl,
int store_rates,
char const *const *http_attrs,
- const int http_attrs_num) {
+ size_t http_attrs_num) {
char temp[512];
size_t offset = 0;
int status;
BUFFER_ADD(", \"tags\":\{");
BUFFER_ADD("\"host\": \"%s\"", vl->host);
- for (int j = 0; j < http_attrs_num; j += 2) {
+ for (size_t j = 0; j < http_attrs_num; j += 2) {
BUFFER_ADD(", \"%s\":", http_attrs[j]);
BUFFER_ADD(" \"%s\"", http_attrs[j + 1]);
}
char *buffer, /* {{{ */
size_t *ret_buffer_fill, size_t *ret_buffer_free, const data_set_t *ds,
const value_list_t *vl, int store_rates, size_t temp_size,
- char const *const *http_attrs, const int http_attrs_num) {
+ char const *const *http_attrs, size_t http_attrs_num) {
char temp[temp_size];
int status;
size_t *ret_buffer_fill, size_t *ret_buffer_free,
const data_set_t *ds, const value_list_t *vl,
int store_rates, char const *const *http_attrs,
- const int http_attrs_num) {
+ size_t http_attrs_num) {
if ((buffer == NULL) || (ret_buffer_fill == NULL) ||
(ret_buffer_free == NULL) || (ds == NULL) || (vl == NULL))
return (-EINVAL);
index bfe505c9aafce013a793b7536196ee798eb435a3..b6aa39d4f18f0f2eb03547c74b4d29004789d17e 100644 (file)
size_t *ret_buffer_free, const data_set_t *ds,
const value_list_t *vl, int store_rates,
char const *const *http_attrs,
- const int http_attrs_num);
+ size_t http_attrs_num);
int format_kairosdb_finalize(char *buffer, size_t *ret_buffer_fill,
size_t *ret_buffer_free);