Re: [ros-dev] [ros-diffs] [pschweitzer] 62779: [CDFS] Convert FCB pathname from simple buffer to unicode string. Please carefully review if I missed something

2014-04-19 Thread Thomas Faber
On 2014-04-18 23:40, pschweit...@svn.reactos.org wrote:
> --- trunk/reactos/drivers/filesystems/cdfs/fcb.c  [iso-8859-1] (original)
> +++ trunk/reactos/drivers/filesystems/cdfs/fcb.c  [iso-8859-1] Fri Apr 18 
> 21:40:02 2014
> @@ -129,7 +131,7 @@
>  BOOLEAN
>  CdfsFCBIsRoot(PFCB Fcb)
>  {
> -return(wcscmp(Fcb->PathName, L"\\") == 0);
> +return (Fcb->PathName.Length = sizeof(WCHAR) && Fcb->PathName.Buffer[0] 
> == L'\\');
>  }

==



Generally I'm seeing a lot of manual work where
RtlInitEmptyUnicodeString and RtlCopyUnicodeString could be used.

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


Re: [ros-dev] [ros-diffs] [pschweitzer] 62779: [CDFS] Convert FCB pathname from simple buffer to unicode string. Please carefully review if I missed something

2014-04-19 Thread Pierre Schweitzer
Thanks for your feedback. I fixed these.

On 19/04/2014 09:31, Thomas Faber wrote:
> On 2014-04-18 23:40, pschweit...@svn.reactos.org wrote:
>> --- trunk/reactos/drivers/filesystems/cdfs/fcb.c [iso-8859-1] (original)
>> +++ trunk/reactos/drivers/filesystems/cdfs/fcb.c [iso-8859-1] Fri Apr 18 
>> 21:40:02 2014
>> @@ -129,7 +131,7 @@
>>  BOOLEAN
>>  CdfsFCBIsRoot(PFCB Fcb)
>>  {
>> -return(wcscmp(Fcb->PathName, L"\\") == 0);
>> +return (Fcb->PathName.Length = sizeof(WCHAR) && Fcb->PathName.Buffer[0] 
>> == L'\\');
>>  }
> ==
>
>
>
> Generally I'm seeing a lot of manual work where
> RtlInitEmptyUnicodeString and RtlCopyUnicodeString could be used.
>
> ___
> Ros-dev mailing list
> Ros-dev@reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev


-- 
Pierre Schweitzer
System Administrator
ReactOS Foundation




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

Re: [ros-dev] [ros-diffs] [pschweitzer] 62779: [CDFS] Convert FCB pathname from simple buffer to unicode string. Please carefully review if I missed something

2014-04-19 Thread Alexander Andrejevic
Hi,

Correct me if I'm wrong, but the original version didn't modify the string 
length.
Are you sure that should be "=" and not "=="?

Regards,
Alex

On Sat, Apr 19, 2014 at 09:31:44AM +0200, Thomas Faber wrote:
> On 2014-04-18 23:40, pschweit...@svn.reactos.org wrote:
> > --- trunk/reactos/drivers/filesystems/cdfs/fcb.c[iso-8859-1] (original)
> > +++ trunk/reactos/drivers/filesystems/cdfs/fcb.c[iso-8859-1] Fri Apr 18 
> > 21:40:02 2014
> > @@ -129,7 +131,7 @@
> >  BOOLEAN
> >  CdfsFCBIsRoot(PFCB Fcb)
> >  {
> > -return(wcscmp(Fcb->PathName, L"\\") == 0);
> > +return (Fcb->PathName.Length = sizeof(WCHAR) && 
> > Fcb->PathName.Buffer[0] == L'\\');
> >  }
> 
> ==
> 
> 
> 
> Generally I'm seeing a lot of manual work where
> RtlInitEmptyUnicodeString and RtlCopyUnicodeString could be used.
> 
> ___
> Ros-dev mailing list
> Ros-dev@reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev

-- 
Alexander Andrejevic 
SDF Public Access UNIX System - http://sdf.lonestar.org

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


Re: [ros-dev] [ros-diffs] [pschweitzer] 62779: [CDFS] Convert FCB pathname from simple buffer to unicode string. Please carefully review if I missed something

2014-04-19 Thread Pierre Schweitzer
Hey!
That's indeed a typo!
Can someone commit a fix? I can't before Monday evening.
Thanks!

Pierre

 Message original 
Objet : Re: [ros-dev] [ros-diffs] [pschweitzer] 62779: [CDFS] Convert FCB 
pathname from simple buffer to unicode string. Please carefully review if I 
missed something
De : Alexander Andrejevic 
À : ReactOS Development List 
Cc : 

Hi,

Correct me if I'm wrong, but the original version didn't modify the string 
length.
Are you sure that should be "=" and not "=="?

Regards,
Alex

On Sat, Apr 19, 2014 at 09:31:44AM +0200, Thomas Faber wrote:
> On 2014-04-18 23:40, pschweit...@svn.reactos.org wrote:
> > --- trunk/reactos/drivers/filesystems/cdfs/fcb.c[iso-8859-1] (original)
> > +++ trunk/reactos/drivers/filesystems/cdfs/fcb.c[iso-8859-1] Fri Apr 18 
> > 21:40:02 2014
> > @@ -129,7 +131,7 @@
> >  BOOLEAN
> >  CdfsFCBIsRoot(PFCB Fcb)
> >  {
> > -return(wcscmp(Fcb->PathName, L"\\") == 0);
> > +return (Fcb->PathName.Length = sizeof(WCHAR) && 
> > Fcb->PathName.Buffer[0] == L'\\');
> >  }
> 
> ==
> 
> 
> 
> Generally I'm seeing a lot of manual work where
> RtlInitEmptyUnicodeString and RtlCopyUnicodeString could be used.
> 
> ___
> Ros-dev mailing list
> Ros-dev@reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev

-- 
Alexander Andrejevic 
SDF Public Access UNIX System - http://sdf.lonestar.org

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

Re: [ros-dev] [ros-diffs] [pschweitzer] 62779: [CDFS] Convert FCB pathname from simple buffer to unicode string. Please carefully review if I missed something

2014-04-19 Thread Hermès BÉLUSCA - MAÏTO
Fix committed in revision 62807, cheers.

Hermès.

-Message d'origine-
De : Ros-dev [mailto:ros-dev-boun...@reactos.org] De la part de Pierre 
Schweitzer
Envoyé : samedi 19 avril 2014 15:58
À : ReactOS Development List
Objet : Re: [ros-dev] [ros-diffs] [pschweitzer] 62779: [CDFS] Convert FCB 
pathname from simple buffer to unicode string. Please carefully review if I 
missed something

Hey!
That's indeed a typo!
Can someone commit a fix? I can't before Monday evening.
Thanks!

Pierre

 Message original 
Objet : Re: [ros-dev] [ros-diffs] [pschweitzer] 62779: [CDFS] Convert FCB 
pathname from simple buffer to unicode string. Please carefully review if I 
missed something De : Alexander Andrejevic  À : 
ReactOS Development List  Cc : 

Hi,

Correct me if I'm wrong, but the original version didn't modify the string 
length.
Are you sure that should be "=" and not "=="?

Regards,
Alex

On Sat, Apr 19, 2014 at 09:31:44AM +0200, Thomas Faber wrote:
> On 2014-04-18 23:40, pschweit...@svn.reactos.org wrote:
> > --- trunk/reactos/drivers/filesystems/cdfs/fcb.c[iso-8859-1] (original)
> > +++ trunk/reactos/drivers/filesystems/cdfs/fcb.c[iso-8859-1] Fri Apr 18 
> > 21:40:02 2014
> > @@ -129,7 +131,7 @@
> >  BOOLEAN
> >  CdfsFCBIsRoot(PFCB Fcb)
> >  {
> > -return(wcscmp(Fcb->PathName, L"\\") == 0);
> > +return (Fcb->PathName.Length = sizeof(WCHAR) && 
> > + Fcb->PathName.Buffer[0] == L'\\');
> >  }
> 
> ==
> 
> 
> 
> Generally I'm seeing a lot of manual work where 
> RtlInitEmptyUnicodeString and RtlCopyUnicodeString could be used.
> 
> ___
> Ros-dev mailing list
> Ros-dev@reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev

--
Alexander Andrejevic  SDF Public Access UNIX System 
- http://sdf.lonestar.org

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

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