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
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
> > >* 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.
___
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 &
--- 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
> 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
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