MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / sint2str

Function sint2str

ut.h:288–304  ·  view source on GitHub ↗

Signed INTeger-TO-STRing: convers a long to a string * returns a pointer to a static buffer containing l in asciiz & sets len */

Source from the content-addressed store, hash-verified

286/* Signed INTeger-TO-STRing: convers a long to a string
287 * returns a pointer to a static buffer containing l in asciiz & sets len */
288static inline char* sint2str(long l, int* len)
289{
290 int sign;
291 char *p;
292
293 sign = 0;
294 if(l<0) {
295 sign = 1;
296 l = -l;
297 }
298 p = int2str((unsigned long)l, len);
299 if(sign) {
300 *(--p) = '-';
301 if (len) (*len)++;
302 }
303 return p;
304}
305
306#define DOUBLE2STR_MAX_LEN INT2STR_MAX_LEN
307static inline char* double2str(double d, int* len)

Callers 15

route_params_expandFunction · 0.85
pv_get_sintvalFunction · 0.85
pv_get_msg_branch_attrFunction · 0.85
pv_get_avpFunction · 0.85
pv_get_scriptvarFunction · 0.85
pv_get_log_levelFunction · 0.85
pv_get_xlog_levelFunction · 0.85
try_get_mi_string_paramFunction · 0.85
pv_get_statFunction · 0.85

Calls 1

int2strFunction · 0.85

Tested by

no test coverage detected