| 109 | } |
| 110 | |
| 111 | static void version_test_cleanup(const char *dir, const char *path, const char *rotated, |
| 112 | const char *victim) { |
| 113 | char lock_path[VERSION_TEST_PATH_CAP]; |
| 114 | if (path) { |
| 115 | int written = snprintf(lock_path, sizeof(lock_path), "%s.lock", path); |
| 116 | if (written > 0 && written < (int)sizeof(lock_path)) { |
| 117 | (void)cbm_unlink(lock_path); |
| 118 | } |
| 119 | } |
| 120 | if (path) { |
| 121 | (void)cbm_unlink(path); |
| 122 | } |
| 123 | if (rotated) { |
| 124 | (void)cbm_unlink(rotated); |
| 125 | } |
| 126 | if (victim) { |
| 127 | (void)cbm_unlink(victim); |
| 128 | } |
| 129 | if (dir) { |
| 130 | (void)cbm_rmdir(dir); |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | #ifndef _WIN32 |
| 135 | typedef struct { |
no test coverage detected