diff options
Diffstat (limited to 'lib/json.c')
| -rw-r--r-- | lib/json.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/json.c b/lib/json.c index 186efc9f48..d8c97e4486 100644 --- a/lib/json.c +++ b/lib/json.c @@ -34,7 +34,7 @@ use_json (const int argc, struct cmd_token *argv[]) if (argc == 0) return 0; - if (argv[argc-1]->arg && strcmp(argv[argc-1]->arg, "json") == 0) + if (argv[argc-1]->arg && strmatch (argv[argc-1]->text, "json")) return 1; return 0; @@ -48,13 +48,7 @@ json_object_string_add(struct json_object* obj, const char *key, } void -json_object_int_add(struct json_object* obj, const char *key, int32_t i) -{ - json_object_object_add(obj, key, json_object_new_int(i)); -} - -void -json_object_long_add(struct json_object* obj, const char *key, int64_t i) +json_object_int_add(struct json_object* obj, const char *key, int64_t i) { #if defined(HAVE_JSON_C_JSON_H) json_object_object_add(obj, key, json_object_new_int64(i)); |
