* Convert two consecutive hexadecimal digits into a char. Return a * negative value on error. Don't run over the end of short strings. */
| 12 | * negative value on error. Don't run over the end of short strings. |
| 13 | */ |
| 14 | static inline int hex2chr(const char *s) |
| 15 | { |
| 16 | unsigned int val = hexval(s[0]); |
| 17 | return (val & ~0xf) ? val : (val << 4) | hexval(s[1]); |
| 18 | } |
| 19 | |
| 20 | /* |
| 21 | * Read `len` pairs of hexadecimal digits from `hex` and write the |
no test coverage detected