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