| 1228 | } |
| 1229 | |
| 1230 | cbm_store_t *cbm_store_open(const char *project) { |
| 1231 | if (!project) { |
| 1232 | return NULL; |
| 1233 | } |
| 1234 | if (!cbm_validate_project_name(project)) { |
| 1235 | return NULL; |
| 1236 | } |
| 1237 | const char *cdir = cbm_resolve_cache_dir(); |
| 1238 | if (!cdir) { |
| 1239 | cdir = cbm_tmpdir(); |
| 1240 | } |
| 1241 | char path[CBM_SZ_1K]; |
| 1242 | snprintf(path, sizeof(path), "%s/%s.db", cdir, project); |
| 1243 | return store_open_internal(path, false, true); |
| 1244 | } |
| 1245 | |
| 1246 | static void finalize_stmt(sqlite3_stmt **s) { |
| 1247 | if (*s) { |
no test coverage detected