X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fmqtt.c;h=851866b082051d38b9f292de35eae691ed6d7a75;hb=af12cc40e48331f8c98294239cef60393218a46d;hp=94686b032d511f3729eb940fcd932b5d65e22a7f;hpb=be126043c2be20399d7670fe194645292018bde0;p=collectd.git diff --git a/src/mqtt.c b/src/mqtt.c index 94686b03..851866b0 100644 --- a/src/mqtt.c +++ b/src/mqtt.c @@ -475,8 +475,8 @@ static int format_topic(char *buf, size_t buf_len, data_set_t const *ds, if ((status < 0) || (((size_t)status) >= buf_len)) return ENOMEM; - while((c = strchr(buf, '#')) || (c = strchr(buf, '+'))) { - *c = '_'; + while ((c = strchr(buf, '#')) || (c = strchr(buf, '+'))) { + *c = '_'; } return 0; @@ -609,9 +609,10 @@ static int mqtt_config_publisher(oconfig_item_t *ci) { } snprintf(cb_name, sizeof(cb_name), "mqtt/%s", conf->name); - plugin_register_write(cb_name, mqtt_write, &(user_data_t){ - .data = conf, - }); + plugin_register_write(cb_name, mqtt_write, + &(user_data_t){ + .data = conf, + }); return 0; } /* mqtt_config_publisher */