MCPcopy Index your code
hub / github.com/esnet/iperf / cJSON_AddNumberToObject

Function cJSON_AddNumberToObject

src/cjson.c:2138–2148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2136}
2137
2138CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number)
2139{
2140 cJSON *number_item = cJSON_CreateNumber(number);
2141 if (add_item_to_object(object, name, number_item, &global_hooks, false))
2142 {
2143 return number_item;
2144 }
2145
2146 cJSON_Delete(number_item);
2147 return NULL;
2148}
2149
2150CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string)
2151{

Callers 7

iperf_tcp_listenFunction · 0.85
iperf_tcp_connectFunction · 0.85
iperf_on_connectFunction · 0.85
send_parametersFunction · 0.85
get_parametersFunction · 0.85
send_resultsFunction · 0.85
iperf_udp_buffercheckFunction · 0.85

Calls 3

cJSON_CreateNumberFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…