Returns the open main database File whose name is the first name_length characters of the given name, or NULL. This must be called while holding Mutex().
| 255 | // name_length characters of the given name, or NULL. This must be called |
| 256 | // while holding Mutex(). |
| 257 | static File* FindMainFileByPrefix(const char* name, size_t name_length) { |
| 258 | for (File* file : MainFiles()) { |
| 259 | if (strlen(file->name) == name_length && strncmp(file->name, name, name_length) == 0) { |
| 260 | return file; |
| 261 | } |
| 262 | } |
| 263 | return NULL; |
| 264 | } |
| 265 | |
| 266 | // Given the name of a journal, returns the main database File that it |
| 267 | // belongs to, or NULL. This must be called while holding Mutex(). |
nothing calls this directly
no outgoing calls
no test coverage detected