[PATCH] Minor fix in gethostent_r()

Simon Perreault simon.perreault at viagenie.ca
Fri Nov 26 19:16:01 UTC 2010


Hi all,

I'm not sure if this is the right venue for contributing fixes, so
please kindly tell me if there is a better way.

Here goes...

> Index: cpukit/libnetworking/libc/gethostbyht.c
> ===================================================================
> RCS file: /usr1/CVS/rtems/cpukit/libnetworking/libc/gethostbyht.c,v
> retrieving revision 1.11
> diff -u -p -r1.11 gethostbyht.c
> --- cpukit/libnetworking/libc/gethostbyht.c	27 Mar 2010 04:00:52 -0000	1.11
> +++ cpukit/libnetworking/libc/gethostbyht.c	26 Nov 2010 19:08:56 -0000
> @@ -223,7 +223,7 @@ struct hostent* gethostent_r(char* buf, 
>    int    curlen;
>    
>     
> -  if (hostf<0) return 0;
> +  if (hostf==NULL) return 0;
>    fseek(hostf,0,SEEK_END);
>    curlen=ftell(hostf);
>    fseek(hostf,0,SEEK_SET);

Simon
-- 
DTN made easy, lean, and smart --> http://postellation.viagenie.ca
NAT64/DNS64 open-source        --> http://ecdysis.viagenie.ca
STUN/TURN server               --> http://numb.viagenie.ca



More information about the users mailing list