summaryrefslogtreecommitdiff
path: root/ext/Socket
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-04-16 19:06:19 +0000
committerNicholas Clark <nick@ccl4.org>2006-04-16 19:06:19 +0000
commit6e11062851163c9273b977b9a485fd8cd91aaeff (patch)
treeafef5d7bfff31885f3c50c5ee75df38315029de4 /ext/Socket
parent1496a2903a805227b24069aa13ba85cf906b9b8c (diff)
downloadperl-6e11062851163c9273b977b9a485fd8cd91aaeff.tar.gz
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
Diffstat (limited to 'ext/Socket')
-rw-r--r--ext/Socket/Socket.xs5
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index 2650cac9a6..48f30d902d 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 );