From: Florian Forster Date: Tue, 4 Aug 2009 08:23:42 +0000 (+0200) Subject: src/common.h: Remove the `ds' argument from the `FORMAT_VL' macro. X-Git-Tag: collectd-4.8.0~61 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4f92890a48dab99e18ef30883c80f4ce70f75ac7;p=collectd.git src/common.h: Remove the `ds' argument from the `FORMAT_VL' macro. Since `type' is now included in `value_list_t' the `data_set_t' is no longer required. --- diff --git a/src/common.h b/src/common.h index e424f5dd..6682e1c8 100644 --- a/src/common.h +++ b/src/common.h @@ -253,9 +253,9 @@ int format_name (char *ret, int ret_len, const char *hostname, const char *plugin, const char *plugin_instance, const char *type, const char *type_instance); -#define FORMAT_VL(ret, ret_len, vl, ds) \ +#define FORMAT_VL(ret, ret_len, vl) \ format_name (ret, ret_len, (vl)->host, (vl)->plugin, (vl)->plugin_instance, \ - (ds)->type, (vl)->type_instance) + (vl)->type, (vl)->type_instance) int parse_identifier (char *str, char **ret_host, char **ret_plugin, char **ret_plugin_instance, diff --git a/src/utils_cache.c b/src/utils_cache.c index 39a14687..a8150121 100644 --- a/src/utils_cache.c +++ b/src/utils_cache.c @@ -441,7 +441,7 @@ int uc_update (const data_set_t *ds, const value_list_t *vl) int status; int i; - if (FORMAT_VL (name, sizeof (name), vl, ds) != 0) + if (FORMAT_VL (name, sizeof (name), vl) != 0) { ERROR ("uc_update: FORMAT_VL failed."); return (-1); @@ -638,7 +638,7 @@ gauge_t *uc_get_rate (const data_set_t *ds, const value_list_t *vl) size_t ret_num = 0; int status; - if (FORMAT_VL (name, sizeof (name), vl, ds) != 0) + if (FORMAT_VL (name, sizeof (name), vl) != 0) { ERROR ("utils_cache: uc_get_rate: FORMAT_VL failed."); return (NULL); @@ -744,7 +744,7 @@ int uc_get_state (const data_set_t *ds, const value_list_t *vl) cache_entry_t *ce = NULL; int ret = STATE_ERROR; - if (FORMAT_VL (name, sizeof (name), vl, ds) != 0) + if (FORMAT_VL (name, sizeof (name), vl) != 0) { ERROR ("uc_get_state: FORMAT_VL failed."); return (STATE_ERROR); @@ -769,7 +769,7 @@ int uc_set_state (const data_set_t *ds, const value_list_t *vl, int state) cache_entry_t *ce = NULL; int ret = -1; - if (FORMAT_VL (name, sizeof (name), vl, ds) != 0) + if (FORMAT_VL (name, sizeof (name), vl) != 0) { ERROR ("uc_get_state: FORMAT_VL failed."); return (STATE_ERROR); @@ -863,7 +863,7 @@ int uc_get_history (const data_set_t *ds, const value_list_t *vl, { char name[6 * DATA_MAX_NAME_LEN]; - if (FORMAT_VL (name, sizeof (name), vl, ds) != 0) + if (FORMAT_VL (name, sizeof (name), vl) != 0) { ERROR ("utils_cache: uc_get_history: FORMAT_VL failed."); return (-1);