X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Futils_rrdcreate.c;h=ef126012e5854be2e3dd293419a65680e1866965;hp=87ad968d5f7c756610397dae6beb7a53a3a2b4b7;hb=a9e50e9e30ecde17e167e271060c8183bfcbf407;hpb=0b7cd83a5e6bac068ea83a88a5ddcfb07c09fbec diff --git a/src/utils_rrdcreate.c b/src/utils_rrdcreate.c index 87ad968d..ef126012 100644 --- a/src/utils_rrdcreate.c +++ b/src/utils_rrdcreate.c @@ -285,11 +285,11 @@ static int ds_get(char ***ret, /* {{{ */ } else snprintf(max, sizeof(max), "%f", d->max); - status = snprintf(buffer, sizeof(buffer), "DS:%s:%s:%i:%s:%s", d->name, - type, (cfg->heartbeat > 0) - ? cfg->heartbeat - : (int)CDTIME_T_TO_TIME_T(2 * vl->interval), - min, max); + status = snprintf( + buffer, sizeof(buffer), "DS:%s:%s:%i:%s:%s", d->name, type, + (cfg->heartbeat > 0) ? cfg->heartbeat + : (int)CDTIME_T_TO_TIME_T(2 * vl->interval), + min, max); if ((status < 1) || ((size_t)status >= sizeof(buffer))) break; @@ -556,9 +556,7 @@ static int srrd_create_async(const char *filename, /* {{{ */ status = pthread_create(&thread, &attr, srrd_create_thread, args); if (status != 0) { - char errbuf[1024]; - ERROR("srrd_create_async: pthread_create failed: %s", - sstrerror(status, errbuf, sizeof(errbuf))); + ERROR("srrd_create_async: pthread_create failed: %s", STRERROR(status)); pthread_attr_destroy(&attr); srrd_create_args_destroy(args); return status;