That's because I hesitate which DOS last error to return. I know that we have to specify one, but I need to recheck (and if Aleksander knows, he can fix that). H.
-----Message d'origine----- De : Ros-dev [mailto:[email protected]] De la part de Pierre Schweitzer Envoyé : jeudi 26 mars 2015 16:21 À : [email protected] Objet : Re: [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. On 03/26/2015 03:52 PM, [email protected] 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 <[email protected]> System & Network Administrator Senior Kernel Developer ReactOS Deutschland e.V. _______________________________________________ Ros-dev mailing list [email protected] http://www.reactos.org/mailman/listinfo/ros-dev
