mirror of
https://github.com/aria2/aria2.git
synced 2024-11-23 18:13:32 +08:00
Use 1 in 2nd parameter of fwrite for consistency
This commit is contained in:
parent
d38da969a5
commit
bc77e48217
@ -270,18 +270,20 @@ void MultiDiskAdaptorTest::testResetDiskWriterEntries()
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
void readFile(const std::string& filename, char* buf, int bufLength)
|
||||
{
|
||||
FILE* f = fopen(filename.c_str(), "r");
|
||||
if (f == nullptr) {
|
||||
CPPUNIT_FAIL(strerror(errno));
|
||||
}
|
||||
int retval = fread(buf, bufLength, 1, f);
|
||||
int retval = fread(buf, 1, bufLength, f);
|
||||
fclose(f);
|
||||
if (retval != 1) {
|
||||
if (retval != bufLength) {
|
||||
CPPUNIT_FAIL("return value is not 1");
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
void MultiDiskAdaptorTest::testWriteData()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user