diff --git a/common/json_param.c b/common/json_param.c index b95952dd48be..c9e3070e3e4b 100644 --- a/common/json_param.c +++ b/common/json_param.c @@ -975,8 +975,7 @@ struct command_result *param_extra_tlvs(struct command *cmd, const char *name, /* Accept either bare ints as keys (not spec * compliant, but simpler), or ints in strings, which * are JSON spec compliant. */ - if (!(json_str_to_u64(buffer, curr, &f->numtype) || - json_to_u64(buffer, curr, &f->numtype))) { + if (!json_to_u64(buffer, curr, &f->numtype)) { return command_fail( cmd, JSONRPC2_INVALID_PARAMS, "\"%s\" is not a valid numeric TLV type.", diff --git a/common/json_parse_simple.c b/common/json_parse_simple.c index 7f9c630ebeb2..53e9470ca711 100644 --- a/common/json_parse_simple.c +++ b/common/json_parse_simple.c @@ -112,19 +112,6 @@ bool json_to_s64(const char *buffer, const jsmntok_t *tok, s64 *num) return true; } -bool json_str_to_u64(const char *buffer, const jsmntok_t *tok, u64 *num) -{ - jsmntok_t temp; - if (tok->type != JSMN_STRING) - return false; - - temp = *tok; - temp.start += 1; - temp.end -= 1; - - return json_to_u64(buffer, &temp, num); -} - bool json_to_double(const char *buffer, const jsmntok_t *tok, double *num) { char *end; diff --git a/common/json_parse_simple.h b/common/json_parse_simple.h index 710520d6f327..6b5a2b068567 100644 --- a/common/json_parse_simple.h +++ b/common/json_parse_simple.h @@ -38,10 +38,6 @@ bool json_to_u64(const char *buffer, const jsmntok_t *tok, u64 *num); /* Extract signed 64 bit integer from this (may be a string, or a number literal) */ bool json_to_s64(const char *buffer, const jsmntok_t *tok, s64 *num); -/* Extract number from string. The number must be the entirety of the - * string between the '"' */ -bool json_str_to_u64(const char *buffer, const jsmntok_t *tok, u64 *num); - /* Extract number from this (may be a string, or a number literal) */ bool json_to_u32(const char *buffer, const jsmntok_t *tok, u32 *num);