Build path: /.codebase-memory/ into caller-owned buf. */
| 124 | |
| 125 | /* Build path: <repo>/.codebase-memory/<name> into caller-owned buf. */ |
| 126 | static bool artifact_path(char *buf, size_t bufsz, const char *repo_path, const char *name) { |
| 127 | int n = snprintf(buf, bufsz, "%s/%s/%s", repo_path, CBM_ARTIFACT_DIR, name); |
| 128 | return n >= 0 && (size_t)n < bufsz; |
| 129 | } |
| 130 | |
| 131 | /* Read entire file into malloc'd buffer. Sets *out_len. Returns NULL on error. */ |
| 132 | static char *read_file_alloc(const char *path, size_t *out_len) { |
no outgoing calls
no test coverage detected