| 221 | } |
| 222 | |
| 223 | static bool diag_set_output_paths(void) { |
| 224 | int snapshot = snprintf(g_diag_path, sizeof(g_diag_path), "%s/%s", g_diag_directory_path, |
| 225 | DIAG_SNAPSHOT_NAME); |
| 226 | int trajectory = snprintf(g_diag_ndjson_path, sizeof(g_diag_ndjson_path), "%s/%s", |
| 227 | g_diag_directory_path, DIAG_TRAJECTORY_NAME); |
| 228 | return snapshot > 0 && (size_t)snapshot < sizeof(g_diag_path) && trajectory > 0 && |
| 229 | (size_t)trajectory < sizeof(g_diag_ndjson_path); |
| 230 | } |
| 231 | |
| 232 | static void diag_directory_close(bool remove_directory) { |
| 233 | #ifndef _WIN32 |
no outgoing calls
no test coverage detected