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

Function int2reverse_hex

ut.h:374–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374inline static int int2reverse_hex( char **c, int *size, unsigned int nr )
375{
376 unsigned short digit;
377
378 if (*size && nr==0) {
379 **c = '0';
380 (*c)++;
381 (*size)--;
382 return 1;
383 }
384
385 while (*size && nr ) {
386 digit = nr & 0xf ;
387 **c= digit >= 10 ? digit + 'a' - 10 : digit + '0';
388 nr >>= 4;
389 (*c)++;
390 (*size)--;
391 }
392 return nr ? -1 /* number not processed; too little space */ : 1;
393}
394
395/* same functions, higher representation 64 bit*/
396/* if unsafe requested when first non numerical character shall be

Callers 15

id_builderFunction · 0.85
branch_builderFunction · 0.85
crcitt_string_arrayFunction · 0.85
dialog_publishFunction · 0.85
__build_param_varFunction · 0.85
topo_dlg_replace_contactFunction · 0.85
init_sip_pingFunction · 0.85
build_branchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected