Merge remote-tracking branch 'origin/collectd-5.8'
[collectd.git] / src / utils_rrdcreate.c
index 87ad968..ef12601 100644 (file)
@@ -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;