| 335 | } |
| 336 | |
| 337 | static int parse_uint8(unsigned char *out, const char **str) |
| 338 | { |
| 339 | int i; |
| 340 | if(parse_int(&i, str) != 0) |
| 341 | return -1; |
| 342 | if(i < 0 || i > 0xff) |
| 343 | return -1; |
| 344 | *out = i; |
| 345 | return 0; |
| 346 | } |
| 347 | |
| 348 | static int parse_uint16(unsigned short *out, const char **str) |
| 349 | { |
no test coverage detected