dynsec: Remove unused code
This commit is contained in:
parent
31e3fa4d07
commit
d0d36b7c33
@ -91,22 +91,6 @@ int json_get_string(cJSON *json, const char *name, char **value, bool optional)
|
||||
}
|
||||
|
||||
|
||||
/* Return a number as a number, or attempt to convert a string to a number, or a bool to a number */
|
||||
double json_get_as_number(const cJSON *json)
|
||||
{
|
||||
char *endptr = NULL;
|
||||
|
||||
if(cJSON_IsNumber(json)){
|
||||
return json->valuedouble;
|
||||
}else if(cJSON_IsString(json)){
|
||||
return strtod(json->valuestring, &endptr);
|
||||
}else if(cJSON_IsBool(json)){
|
||||
return cJSON_IsTrue(json);
|
||||
}else{
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *cJSON_AddIntToObject(cJSON * const object, const char * const name, int number)
|
||||
{
|
||||
char buf[30];
|
||||
|
@ -22,7 +22,6 @@ Contributors:
|
||||
int json_get_bool(cJSON *json, const char *name, bool *value, bool optional, bool default_value);
|
||||
int json_get_int(cJSON *json, const char *name, int *value, bool optional, int default_value);
|
||||
int json_get_string(cJSON *json, const char *name, char **value, bool optional);
|
||||
double json_get_as_number(const cJSON *json);
|
||||
|
||||
cJSON *cJSON_AddIntToObject(cJSON * const object, const char * const name, int number);
|
||||
cJSON *cJSON_CreateInt(int num);
|
||||
|
Loading…
Reference in New Issue
Block a user