mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 00:48:11 +00:00
Kernel: Update check in Inode::read_entire
The nread variable can't be less than zero anymore.
This commit is contained in:
parent
bf779e182e
commit
58c182b19e
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ KResultOr<NonnullOwnPtr<KBuffer>> Inode::read_entire(FileDescription* descriptio
|
||||||
return result.error();
|
return result.error();
|
||||||
nread = result.value();
|
nread = result.value();
|
||||||
VERIFY(nread <= sizeof(buffer));
|
VERIFY(nread <= sizeof(buffer));
|
||||||
if (nread <= 0)
|
if (nread == 0)
|
||||||
break;
|
break;
|
||||||
builder.append((const char*)buffer, nread);
|
builder.append((const char*)buffer, nread);
|
||||||
offset += nread;
|
offset += nread;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue