mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Remove check for negative unsigned expression
According to cppcheck's `unsignedLessThanZero` error: ``` src\engine\shared\datafile.cpp:129:13: style: Checking if unsigned expression 'Bytes' is less than zero. [unsignedLessThanZero] if(Bytes <= 0) ^ ```
This commit is contained in:
parent
8e675878b0
commit
54a13b1c12
|
@ -116,7 +116,7 @@ bool CDataFileReader::Open(class IStorage *pStorage, const char *pFilename, int
|
|||
while(true)
|
||||
{
|
||||
unsigned Bytes = io_read(File, aBuffer, BUFFER_SIZE);
|
||||
if(Bytes <= 0)
|
||||
if(Bytes == 0)
|
||||
break;
|
||||
Crc = crc32(Crc, aBuffer, Bytes);
|
||||
sha256_update(&Sha256Ctxt, aBuffer, Bytes);
|
||||
|
|
Loading…
Reference in a new issue