| 847 | } |
| 848 | |
| 849 | static int |
| 850 | str2id(const char *str, id_t *value) |
| 851 | { |
| 852 | char *end; |
| 853 | |
| 854 | if (str == NULL) |
| 855 | return (EINVAL); |
| 856 | |
| 857 | *value = strtoul(str, &end, 10); |
| 858 | if ((size_t)(end - str) != strlen(str)) |
| 859 | return (EINVAL); |
| 860 | |
| 861 | return (0); |
| 862 | } |
| 863 | |
| 864 | static int |
| 865 | str2int64(const char *str, int64_t *value) |
no test coverage detected