MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / update_offset

Function update_offset

framework/utils/cJSON.c:461–471  ·  view source on GitHub ↗

calculate the new length of the string in a printbuffer and update the offset */

Source from the content-addressed store, hash-verified

459
460/* calculate the new length of the string in a printbuffer and update the offset */
461static void update_offset(printbuffer * const buffer)
462{
463 const unsigned char *buffer_pointer = NULL;
464 if ((buffer == NULL) || (buffer->buffer == NULL))
465 {
466 return;
467 }
468 buffer_pointer = buffer->buffer + buffer->offset;
469
470 buffer->offset += strlen((const char*)buffer_pointer);
471}
472
473/* Render the number nicely from the given item into a string. */
474static cJSON_bool print_number(const cJSON * const item, printbuffer * const output_buffer)

Callers 3

printFunction · 0.85
print_arrayFunction · 0.85
print_objectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected