[ros-dev] [ros-diffs] [hbelusca] 66903: [NTVDM] - Fix some english. - Validity checks for DosGetSftEntry returned pointer added. - Use unsigned indices for for-loops indices that are always positive.
Pierre Schweitzer
pierre at reactos.org
Thu Mar 26 15:21:25 UTC 2015
On 03/26/2015 03:52 PM, hbelusca at svn.reactos.org wrote:
> Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/bios.c
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/bios.c?rev=66903&r1=66902&r2=66903&view=diff
> ==============================================================================
> --- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/bios.c [iso-8859-1] (original)
> +++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/bios.c [iso-8859-1] Thu Mar 26 14:52:16 2015
> @@ -56,6 +56,13 @@
> BOOLEAN DosCheckInput(VOID)
> {
> PDOS_SFT_ENTRY SftEntry = DosGetSftEntry(DOS_INPUT_HANDLE);
> +
> + if (SftEntry == NULL)
> + {
> + /* Invalid handle */
> + DosLastError = ERROR_INVALID_HANDLE; // ERROR_FILE_NOT_FOUND
Hum... Why?
Is the error code wrong and should be ERROR_FILE_NOT_FOUND? And then,
why setting this other error code?
Or is the error code right, and then, what's the purpose of such comment?
Or do you have a doubt about the right error code to use? Be it one or
the other?
I come back to my eternal comment: don't comment for yourself. Comment
for the others, you're not alone here. So, make it explicit.
Cheers,
--
Pierre Schweitzer <pierre at reactos.org>
System & Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4277 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.reactos.org/pipermail/ros-dev/attachments/20150326/0ece450d/attachment.bin>
More information about the Ros-dev
mailing list