summaryrefslogtreecommitdiffstats
path: root/src/unit_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unit_test.c')
-rw-r--r--src/unit_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/unit_test.c b/src/unit_test.c
index 47aa5396..06b7afac 100644
--- a/src/unit_test.c
+++ b/src/unit_test.c
@@ -128,7 +128,7 @@ void benchmark_storage_number(int loop, int multiplier) {
for(i = 0; i < loop ;i++) {
n *= multiplier;
if(n > STORAGE_NUMBER_POSITIVE_MAX) n = STORAGE_NUMBER_POSITIVE_MIN;
- snprintf(buffer, 100, CALCULATED_NUMBER_FORMAT, n);
+ snprintfz(buffer, 100, CALCULATED_NUMBER_FORMAT, n);
}
}
@@ -614,7 +614,7 @@ int run_test(struct test *test)
rrd_update_every = test->update_every;
char name[101];
- snprintf(name, 100, "unittest-%s", test->name);
+ snprintfz(name, 100, "unittest-%s", test->name);
// create the chart
RRDSET *st = rrdset_create("netdata", name, name, "netdata", NULL, "Unit Testing", "a value", 1, 1, RRDSET_TYPE_LINE);
@@ -703,7 +703,7 @@ int unit_test(long delay, long shift)
repeat++;
char name[101];
- snprintf(name, 100, "unittest-%d-%ld-%ld", repeat, delay, shift);
+ snprintfz(name, 100, "unittest-%d-%ld-%ld", repeat, delay, shift);
//debug_flags = 0xffffffff;
rrd_memory_mode = RRD_MEMORY_MODE_RAM;