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

Function reverse_hex2int

ut.h:357–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355
356
357inline static int reverse_hex2int( char *c, int len, unsigned int *r)
358{
359 char *pc;
360 char mychar;
361
362 *r=0;
363 for (pc=c+len-1; len>0; pc--, len--) {
364 (*r) <<= 4 ;
365 mychar=*pc;
366 if ( mychar >='0' && mychar <='9') (*r)+=mychar -'0';
367 else if (mychar >='a' && mychar <='f') (*r)+=mychar -'a'+10;
368 else if (mychar >='A' && mychar <='F') (*r)+=mychar -'A'+10;
369 else return -1;
370 }
371 return 0;
372}
373
374inline static int int2reverse_hex( char **c, int *size, unsigned int nr )
375{

Callers 6

forward_replyFunction · 0.85
parse_branchFunction · 0.85
mi_tm_replyFunction · 0.85
t_reply_matchingFunction · 0.85
_ident_parserFunction · 0.85
parse_dlg_didFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected