diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-05-16 00:37:34 +0200 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2018-07-10 23:41:14 +0200 |
commit | c8d0593d6495e87603806ada76a399500cdc2831 (patch) | |
tree | d0d9dc88a43ab30a3712a7946d21baea837bebfb /src/plugins/influxdb.c | |
parent | 4f40dc104633e44d3b021fafb1057b7669616926 (diff) |
Fix memory leak and avoid compile warning
Change-Id: Ib0bcba9daad456f63c0ea704e1fa87f44b6acc98
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/plugins/influxdb.c')
-rw-r--r-- | src/plugins/influxdb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/influxdb.c b/src/plugins/influxdb.c index 27161ab..a98bd2b 100644 --- a/src/plugins/influxdb.c +++ b/src/plugins/influxdb.c @@ -41,11 +41,11 @@ size_t make_url(char *url, size_t l_url, const char *host, const char *port, con port = port ? port : DEFAULT_DBPORT; strncat(url, host, strlen(host)); - strncat(url, ":", 1); + strcat(url, ":"); strncat(url, port, strlen(port)); - strncat(url, "/", 1); + strcat(url, "/"); strncat(url, endpoint, strlen(endpoint)); - strncat(url, "?db="DEFAULT_DB, strlen("?db="DEFAULT_DB)); + strcat(url, "?db="DEFAULT_DB); return strlen(url); } |