Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=a91f7770b8fe66a171565c6af94773899f3f2ee7

commit a91f7770b8fe66a171565c6af94773899f3f2ee7
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Mon Oct 12 00:18:28 2009 +0200

ftplib: just return silently when gethostbyname fails

Returning a 0 indicates the error already and writing to stdout makes no
sense on a lib.

diff --git a/lib/libftp/ftplib.c b/lib/libftp/ftplib.c
index 51c617e..bf95782 100644
--- a/lib/libftp/ftplib.c
+++ b/lib/libftp/ftplib.c
@@ -417,7 +417,6 @@ GLOBALDEF int FtpConnect(const char *host, netbuf 
**nControl)
{
if ((phe = gethostbyname(lhost)) == NULL)
{
-                       perror("gethostbyname");
return 0;
}
memcpy((char *)&sin.sin_addr, phe->h_addr, phe->h_length);
@@ -1354,7 +1353,6 @@ GLOBALREF int HttpConnect(const char *host, unsigned 
short port, netbuf **nContr
{
if ((phe = gethostbyname(lhost)) == NULL)
{
-                       perror("gethostbyname");
return 0;
}
memcpy((char *)&sin.sin_addr, phe->h_addr, phe->h_length);
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to