mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
param: upgraded json_tok_double
Also renamed old version to json_to_double for use as a utility funciton. Signed-off-by: Mark Beckwith <wythe@intrig.com>
This commit is contained in:
committed by
Rusty Russell
parent
bab8ff991a
commit
e5918f4e5a
@@ -66,7 +66,7 @@ bool json_to_u64(const char *buffer, const jsmntok_t *tok,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool json_tok_double(const char *buffer, const jsmntok_t *tok, double *num)
|
||||
bool json_to_double(const char *buffer, const jsmntok_t *tok, double *num)
|
||||
{
|
||||
char *end;
|
||||
|
||||
@@ -78,7 +78,7 @@ bool json_tok_double(const char *buffer, const jsmntok_t *tok, double *num)
|
||||
|
||||
bool json_tok_percent(const char *buffer, const jsmntok_t *tok, double *num)
|
||||
{
|
||||
if (!json_tok_double(buffer, tok, num))
|
||||
if (!json_to_double(buffer, tok, num))
|
||||
return false;
|
||||
|
||||
/* Ensure it is in the range [0.0, 100.0] */
|
||||
|
||||
Reference in New Issue
Block a user