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
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:
+3
-5
@@ -873,11 +873,9 @@ int receive_manifest(int fd, const Config* config, int* next_status) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (manifest) {
|
fprintf(stderr, "Deleting files not in manifest...\n");
|
||||||
fprintf(stderr, "Deleting files not in manifest...\n");
|
delete_extras(config->receive_root_directory, manifest);
|
||||||
delete_extras(config->receive_root_directory, manifest);
|
array_list_delete(manifest);
|
||||||
array_list_delete(manifest);
|
|
||||||
}
|
|
||||||
if (!receive_status(fd, next_status))
|
if (!receive_status(fd, next_status))
|
||||||
return -1;
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
+5
-5
@@ -138,11 +138,11 @@ static void test_to_disk_does_not_follow_symlink() {
|
|||||||
FILE* fp = fopen(outside, "rb");
|
FILE* fp = fopen(outside, "rb");
|
||||||
char buf[16] = {0};
|
char buf[16] = {0};
|
||||||
EXPECT_NOT_NULL(fp);
|
EXPECT_NOT_NULL(fp);
|
||||||
if (fp) {
|
if (!fp)
|
||||||
size_t read_count = fread(buf, 1, sizeof(buf) - 1, fp);
|
return;
|
||||||
EXPECT_TRUE(read_count <= sizeof(buf) - 1);
|
size_t read_count = fread(buf, 1, sizeof(buf) - 1, fp);
|
||||||
fclose(fp);
|
EXPECT_TRUE(read_count <= sizeof(buf) - 1);
|
||||||
}
|
fclose(fp);
|
||||||
EXPECT_EQ_STR(buf, "outside");
|
EXPECT_EQ_STR(buf, "outside");
|
||||||
unlink(outside);
|
unlink(outside);
|
||||||
unlink(link);
|
unlink(link);
|
||||||
|
|||||||
@@ -91,8 +91,8 @@ static void test_sender_zero_capacity() {
|
|||||||
cfg->send_directory = str_dup("/src");
|
cfg->send_directory = str_dup("/src");
|
||||||
cfg->receive_root_directory = str_dup("/dst");
|
cfg->receive_root_directory = str_dup("/dst");
|
||||||
|
|
||||||
Queue* q1 = queue_create(0, NULL);
|
Queue* const q1 = queue_create(0, NULL);
|
||||||
Queue* q2 = queue_create(0, NULL);
|
Queue* const q2 = queue_create(0, NULL);
|
||||||
EXPECT_NULL(q1);
|
EXPECT_NULL(q1);
|
||||||
EXPECT_NULL(q2);
|
EXPECT_NULL(q2);
|
||||||
config_delete(cfg);
|
config_delete(cfg);
|
||||||
|
|||||||
Reference in New Issue
Block a user