Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
None
-
None
Description
While working on CORE-12672, I noticed some code like:
FileOffset.QuadPart = 0ULL;
|
Status = NtReadFile(FileHandle,
|
NULL,
|
NULL,
|
NULL,
|
&IoStatusBlock,
|
OrigBootSector,
|
SECTORSIZE,
|
NULL, // (default/missing) ByteOffset parameter. |
NULL);
|
So I asked:
We may want to check current code for missing param uses or superfluous '0' init+uses...
And hbelusca replied:
It is always better to specify where to start to read, before doing the operation (especially when these are unbuffered reads as I think they are there).
Then, the current issue is to improve such cases.
And maybe standalone NULL too, if/where not needed to be.
–
NtReadFile grep
NtWriteFile grep
ZwReadFile grep
ZwWriteFile grep