From: Nicholas Clark Date: Sun, 16 Apr 2006 19:06:19 +0000 (+0000) Subject: Coverity is flagging a potential problem because it sees a check for X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6e11062851163c9273b977b9a485fd8cd91aaeff;p=p5sagit%2Fp5-mst-13.2.git Coverity is flagging a potential problem because it sees a check for NULL and assumes that this means that the variable host could be NULL. It can't, and the check added in change 13291 was a little bit more than the minimal solution needed for the bug report [ID 20011126.148] Hence remove the NULL check. p4raw-id: //depot/perl@27851 --- diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs index 2650cac..48f30d9 100644 --- a/ext/Socket/Socket.xs +++ b/ext/Socket/Socket.xs @@ -231,10 +231,7 @@ inet_aton(host) { struct in_addr ip_address; struct hostent * phe; - int ok = - (host != NULL) && - (*host != '\0') && - inet_aton(host, &ip_address); + int ok = (*host != '\0') && inet_aton(host, &ip_address); if (!ok && (phe = gethostbyname(host))) { Copy( phe->h_addr, &ip_address, phe->h_length, char );