Tijl Coosemans : ntdll: Add FreeBSD default serial port device.

Tijl Coosemans tijl at ulyssis.org
Mon Aug 7 10:15:19 CDT 2006


On Monday 07 August 2006 14:26, Marcus Meissner wrote:
> On Mon, Aug 07, 2006 at 07:13:04AM -0500, Alexandre Julliard wrote:
> > Module: wine
> > Branch: refs/heads/master
> > Commit: e548d4083177125559f752d902907187cea60474
> > URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=e548d4083177125559f752d902907187cea60474
> > 
> > Author: Tijl Coosemans <tijl at ulyssis.org>
> > Date:   Sat Aug  5 23:12:22 2006 +0200
> > 
> > ntdll: Add FreeBSD default serial port device.
> > 
> > ---
> > 
> >  dlls/ntdll/directory.c |    7 +++++++
> >  1 files changed, 7 insertions(+), 0 deletions(-)
> > 
> > diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
> > index 47d018a..84624a8 100644
> > --- a/dlls/ntdll/directory.c
> > +++ b/dlls/ntdll/directory.c
> > @@ -175,6 +175,13 @@ #ifdef linux
> >          strcpy( ret, "/dev/ttyS0" );
> >          ret[strlen(ret) - 1] = '0' + num - 1;
> >      }
> > +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
> > +    ret = RtlAllocateHeap( GetProcessHeap(), 0, sizeof("/dev/cuad0") );
> 
> Surely you mean strlen()+1.
> 
> sizeof("hallo") might just be sizeof(char*)

strlen would certainly be safer, but I think sizeof sees the string as
an array here, not a pointer. In any case, I simply copy-pasted the
#ifdef linux, so that would have to change as well.



More information about the wine-devel mailing list