Re: hostmux patch

2002-03-04 Thread Roland McGrath
I think the good thing to do nowadays is use the `getaddrinfo' interface instead. (Another good thing to do would be to document those calls in the libc manual. :-) ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-h

Re: hostmux patch

2002-03-04 Thread Ognyan Kulev
James Morrison wrote: > Humm, I do cast the return value of malloc, but any of the examples > in the libc manual or the GCS also cast the return value of malloc > The GCS only says not to cast to void * . Casting the result of malloc is *required* in C++ and is *optional* in C. -- Ognyan Kulev

Re: hostmux patch

2002-03-03 Thread Neal H Walfield
> > >* mux.c (lookup_host): removed arbitrary limit on host name > > >size. > > > > Consider using realloc instead of a free followed by a malloc. > > I'm not so sure. realloc would involve copying the existing data, > while free & malloc would not. Yes, that is a valid point. ___

Re: hostmux patch

2002-03-03 Thread Adam Olsen
On Sun, Mar 03, 2002 at 08:43:46PM -0500, Neal H Walfield wrote: > > * mux.c (lookup_host): removed arbitrary limit on host name > > size. > > Consider using realloc instead of a free followed by a malloc. I'm not so sure. realloc would involve copying the existing data, while free &

Re: hostmux patch

2002-03-03 Thread James Morrison
--- Neal H Walfield <[EMAIL PROTECTED]> wrote: > > Hey, > > > > Guess what? It's time for my weekly patch ;) This stuff is > mostly > > out of the glibc manual ;) > > > > 2002-03-03 James A. Morrison <[EMAIL PROTECTED]> > > > > * mux.c (lookup_host): removed arbitrary limit on host

Re: hostmux patch

2002-03-03 Thread Neal H Walfield
> Hey, > > Guess what? It's time for my weekly patch ;) This stuff is mostly > out of the glibc manual ;) > > 2002-03-03 James A. Morrison <[EMAIL PROTECTED]> > >* mux.c (lookup_host): removed arbitrary limit on host name >size. This is a good start. Perhaps we should h

hostmux patch

2002-03-03 Thread James A Morrison
Hey, Guess what? It's time for my weekly patch ;) This stuff is mostly out of the glibc manual ;) 2002-03-03 James A. Morrison <[EMAIL PROTECTED]> * mux.c (lookup_host): removed arbitrary limit on host name size. Index: mux.c