fix: satisfy static analysis in regression paths
CI / lint (pull_request) Failing after 2m10s
CI / build-and-test (pull_request) Has been skipped
CI / sanitizers (address) (pull_request) Has been skipped
CI / sanitizers (undefined) (pull_request) Has been skipped
CI / fuzz-build (pull_request) Has been skipped
CI / coverage (pull_request) Has been skipped
CI / valgrind (pull_request) Has been skipped

This commit is contained in:
2026-08-08 20:40:13 +02:00
parent 9985a8f6a4
commit a6ec201800
3 changed files with 10 additions and 12 deletions
+3 -5
View File
@@ -873,11 +873,9 @@ int receive_manifest(int fd, const Config* config, int* next_status) {
return -1;
}
}
if (manifest) {
fprintf(stderr, "Deleting files not in manifest...\n");
delete_extras(config->receive_root_directory, manifest);
array_list_delete(manifest);
}
fprintf(stderr, "Deleting files not in manifest...\n");
delete_extras(config->receive_root_directory, manifest);
array_list_delete(manifest);
if (!receive_status(fd, next_status))
return -1;
return 0;
+5 -5
View File
@@ -138,11 +138,11 @@ static void test_to_disk_does_not_follow_symlink() {
FILE* fp = fopen(outside, "rb");
char buf[16] = {0};
EXPECT_NOT_NULL(fp);
if (fp) {
size_t read_count = fread(buf, 1, sizeof(buf) - 1, fp);
EXPECT_TRUE(read_count <= sizeof(buf) - 1);
fclose(fp);
}
if (!fp)
return;
size_t read_count = fread(buf, 1, sizeof(buf) - 1, fp);
EXPECT_TRUE(read_count <= sizeof(buf) - 1);
fclose(fp);
EXPECT_EQ_STR(buf, "outside");
unlink(outside);
unlink(link);
+2 -2
View File
@@ -91,8 +91,8 @@ static void test_sender_zero_capacity() {
cfg->send_directory = str_dup("/src");
cfg->receive_root_directory = str_dup("/dst");
Queue* q1 = queue_create(0, NULL);
Queue* q2 = queue_create(0, NULL);
Queue* const q1 = queue_create(0, NULL);
Queue* const q2 = queue_create(0, NULL);
EXPECT_NULL(q1);
EXPECT_NULL(q2);
config_delete(cfg);