| 54 | } |
| 55 | |
| 56 | static bool instance_key_valid(const char *key) { |
| 57 | if (!key) { |
| 58 | return false; |
| 59 | } |
| 60 | for (size_t i = 0; i < 16; i++) { |
| 61 | char ch = key[i]; |
| 62 | bool decimal = ch >= '0' && ch <= '9'; |
| 63 | bool lower = ch >= 'a' && ch <= 'f'; |
| 64 | if (!decimal && !lower) { |
| 65 | return false; |
| 66 | } |
| 67 | } |
| 68 | return key[16] == '\0'; |
| 69 | } |
| 70 | |
| 71 | static char *string_copy(const char *value) { |
| 72 | if (!value) { |
no outgoing calls
no test coverage detected