| 21 | }) |
| 22 | |
| 23 | static void |
| 24 | hex_string_to_uint64(uint64_t *dst, const char *hexs) |
| 25 | { |
| 26 | char buf[2] = {0}; |
| 27 | uint8_t shift = 4; |
| 28 | int iter = 0; |
| 29 | char c; |
| 30 | |
| 31 | while ((c = *hexs++)) { |
| 32 | buf[0] = c; |
| 33 | *dst |= (strtol(buf, NULL, 16) << shift); |
| 34 | shift -= 4; |
| 35 | iter++; |
| 36 | if (iter == 2) { |
| 37 | iter = 0; |
| 38 | shift = 4; |
| 39 | dst++; |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | int |
| 45 | parser_uint64_read(uint64_t *value, const char *p) |
no test coverage detected