[ros-dev] Re: [ros-diffs] [weiden] 18213: minor changes (mostly formatting)

Hartmut Birr osexpert at gmail.com
Sun Oct 2 14:59:42 CEST 2005


weiden at svn.reactos.com wrote:

>minor changes (mostly formatting)
>
>Modified: trunk/reactos/lib/hid/hid.c
>Modified: trunk/reactos/lib/shellext/slayer/slayer.c
>  
>
> ------------------------------------------------------------------------
> *Modified: trunk/reactos/lib/hid/hid.c*
>
>--- trunk/reactos/lib/hid/hid.c	2005-10-02 12:27:54 UTC (rev 18212)
>+++ trunk/reactos/lib/hid/hid.c	2005-10-02 12:46:49 UTC (rev 18213)
>@@ -368,8 +368,8 @@
>
> HidD_Hello(OUT PCHAR Buffer,
>            IN ULONG BufferLength)
> {
>  
>
>-  const PCHAR HelloString = "Hello\n";
>-  ULONG StrSize = (lstrlenA(HelloString) + 1) * sizeof(CHAR);
>  
>
>+  const CHAR HelloString[] = "Hello\n";
>+  ULONG StrSize = sizeof(HelloString) + sizeof(HelloString[0]);
>  
>
>   
>   if(BufferLength > 0)
>   {
>  
>
> ------------------------------------------------------------------------

Hi,

sizeof(HelloString) does already contain the terminating NULL.

- Hartmut


More information about the Ros-dev mailing list