MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / cmp

Function cmp

strings/dtoa.c:1105–1126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1103
1104
1105static int cmp(Bigint *a, Bigint *b)
1106{
1107 ULong *xa, *xa0, *xb, *xb0;
1108 int i, j;
1109
1110 i= a->wds;
1111 j= b->wds;
1112 if (i-= j)
1113 return i;
1114 xa0= a->p.x;
1115 xa= xa0 + j;
1116 xb0= b->p.x;
1117 xb= xb0 + j;
1118 for (;;)
1119 {
1120 if (*--xa != *--xb)
1121 return *xa < *xb ? -1 : 1;
1122 if (xa <= xa0)
1123 break;
1124 }
1125 return 0;
1126}
1127
1128
1129static Bigint *diff(Bigint *a, Bigint *b, Stack_alloc *alloc)

Callers 8

diffFunction · 0.85
my_strtod_intFunction · 0.85
quoremFunction · 0.85
dtoaFunction · 0.85
ptr_compare_0Function · 0.85
ptr_compare_1Function · 0.85
ptr_compare_2Function · 0.85
ptr_compare_3Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected