| 18 | }; |
| 19 | |
| 20 | static char *git_strdup(const char *s) { |
| 21 | if (!s) { |
| 22 | s = ""; |
| 23 | } |
| 24 | size_t n = strlen(s) + 1; |
| 25 | char *out = (char *)malloc(n); |
| 26 | if (!out) { |
| 27 | return NULL; |
| 28 | } |
| 29 | memcpy(out, s, n); |
| 30 | return out; |
| 31 | } |
| 32 | |
| 33 | static void trim_newlines(char *s) { |
| 34 | if (!s) { |
no outgoing calls
no test coverage detected