FILE* f = NULL;
char path[PATH_MAX];
char buffer[1024];
+ size_t bytes_read;
ASSERT_SUCCESS(pakfire_string_format(path, "%s/%s", TEST_SRC_PATH, file));
ASSERT(f = fopen(path, "r"));
// Engage decompressor
- f = function(f, "r");
- ASSERT(f);
+ ASSERT(f = function(f, "r"));
// Read into buffer
- size_t bytes_read = fread(buffer, 1, sizeof(buffer), f);
- ASSERT(bytes_read);
+ ASSERT(bytes_read = fread(buffer, 1, sizeof(buffer), f));
// Buffer should equal the test data
ASSERT(bytes_read >= sizeof(TEST_DATA) - 1);