| 1102 | } |
| 1103 | |
| 1104 | cbm_store_t *cbm_store_open(const char *project) { |
| 1105 | if (!project) { |
| 1106 | return NULL; |
| 1107 | } |
| 1108 | if (!cbm_validate_project_name(project)) { |
| 1109 | return NULL; |
| 1110 | } |
| 1111 | const char *cdir = cbm_resolve_cache_dir(); |
| 1112 | if (!cdir) { |
| 1113 | cdir = cbm_tmpdir(); |
| 1114 | } |
| 1115 | char path[CBM_SZ_1K]; |
| 1116 | snprintf(path, sizeof(path), "%s/%s.db", cdir, project); |
| 1117 | return store_open_internal(path, false, true); |
| 1118 | } |
| 1119 | |
| 1120 | static void finalize_stmt(sqlite3_stmt **s) { |
| 1121 | if (*s) { |
no test coverage detected