|
|
@@ -46,7 +46,6 @@
|
|
|
#include <stdlib.h>
|
|
|
#include <string.h>
|
|
|
#include <stddef.h>
|
|
|
-#include <stdio.h>
|
|
|
|
|
|
#include <ncd/NCDModule.h>
|
|
|
#include <ncd/value_utils.h>
|
|
|
@@ -136,12 +135,9 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
|
|
|
struct instance *o = vo;
|
|
|
|
|
|
if (!strcmp(name, "")) {
|
|
|
- char str[64];
|
|
|
- snprintf(str, sizeof(str), "%zu", o->value);
|
|
|
-
|
|
|
- *out = NCDVal_NewString(mem, str);
|
|
|
+ *out = ncd_make_uintmax(mem, o->value);
|
|
|
if (NCDVal_IsInvalid(*out)) {
|
|
|
- ModuleLog(o->i, BLOG_ERROR, "NCDVal_NewString failed");
|
|
|
+ ModuleLog(o->i, BLOG_ERROR, "ncd_make_uintmax failed");
|
|
|
}
|
|
|
return 1;
|
|
|
}
|