MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cv_decimal

Function cv_decimal

src/mcp/test_impact_coverage.c:102–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102static bool cv_decimal(const char *text, int *value, const char **end) {
103 if (*text < '0' || *text > '9') {
104 return false;
105 }
106 int number = 0;
107 while (*text >= '0' && *text <= '9') {
108 int digit = *text++ - '0';
109 if (number > (INT_MAX - digit) / 10) {
110 return false;
111 }
112 number = number * 10 + digit;
113 }
114 *value = number;
115 *end = text;
116 return true;
117}
118
119static int cv_function_compare(const void *left, const void *right) {
120 const cbm_coverage_function_t *a = *(const cbm_coverage_function_t *const *)left;

Callers 2

cv_functionsFunction · 0.85
cv_idsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected