Also fix a couple of integer/pointer comparaisons

This commit is contained in:
Thomas Bernard 2012-05-01 11:53:36 +02:00
parent e42dfd3284
commit 4edb1c03ce
3 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@ $Id: Changelog.txt,v 1.278 2012/04/30 21:21:32 nanard Exp $
2012/04/30:
Clean up settings of CFLAGS in Makefile's
Remove Warnings caused by signed/unsigned integer comparaisons
Also fix a couple of integer/pointer comparaisons.
Add UNUSED(arg) macro to remove unused argument warning.
Fix error handling in upnpevents.c (was causing segfault on Solaris !)

View File

@ -393,7 +393,7 @@ upnp_get_redirection_infos_by_index(int index,
if(desc && (desclen > 0))
desc[0] = '\0';
if(rhost && (rhost > 0))
if(rhost && (rhostlen > 0))
rhost[0] = '\0';
if(get_redirect_rule_by_index(index, 0/*ifname*/, eport, iaddr, iaddrlen,
iport, &proto, desc, desclen,

View File

@ -1250,7 +1250,7 @@ PinholeVerification(struct upnphttp * h, char * int_ip, unsigned short int_port)
freeaddrinfo(p);
}
if(inet_ntop(AF_INET6, &(h->clientaddr_v6), senderAddr, INET6_ADDRSTRLEN)<=0)
if(inet_ntop(AF_INET6, &(h->clientaddr_v6), senderAddr, INET6_ADDRSTRLEN) == NULL)
{
syslog(LOG_ERR, "inet_ntop: %m");
}