File: 05-inet_addr_fix.patch

package info (click to toggle)
cvsps 2.1-9
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 612 kB
  • sloc: ansic: 4,724; makefile: 60; sh: 26
file content (13 lines) | stat: -rw-r--r-- 375 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
Author: Iustin Pop <iusty@k1024.org>
Description: Fix the inet_addr result check with correct type casting
--- a/cbtcommon/tcpsocket.c
+++ b/cbtcommon/tcpsocket.c
@@ -198,7 +198,7 @@
     memcpy(dest, &ip.s_addr, sizeof(ip.s_addr));
   }
 #else
-  if ( (*dest = inet_addr(addr_str)) != -1)
+  if ( (*dest = inet_addr(addr_str)) != (in_addr_t)-1)
   {
     /* nothing */
   }