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 positi

2015-03-26 Thread Aleksey Bragin

On 26.03.2015 18:56, Hermès BÉLUSCA - MAÏTO wrote:

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.


Why don't you write so in the comment?

Regards,
Aleksey Bragin

___
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev

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 positi

2015-03-26 Thread Hermès BÉLUSCA - MAÏTO
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:ros-dev-boun...@reactos.org] De la part de Pierre 
Schweitzer
Envoyé : jeudi 26 mars 2015 16:21
À : ros-dev@reactos.org
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, hbelu...@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=66903r1=66902r2=66903view=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 pie...@reactos.org
System  Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.


___
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev

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 positi

2015-03-26 Thread Pierre Schweitzer
On 03/26/2015 03:52 PM, hbelu...@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=66903r1=66902r2=66903view=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 pie...@reactos.org
System  Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.



smime.p7s
Description: S/MIME Cryptographic Signature
___
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev