siproxd bug 3086371
sock.c:727: warning: passing argument 2 of 'connect' from incompatible pointer type sock.c:757: warning: pointer targets in passing argument 5 of 'getsockopt' differ in signedness
This commit is contained in:
+3
-3
@@ -724,7 +724,7 @@ static int tcp_connect(struct sockaddr_in dst_addr) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
sts=connect(sock, &dst_addr, sizeof(struct sockaddr_in));
|
||||
sts=connect(sock, (struct sockaddr *)&dst_addr, sizeof(struct sockaddr_in));
|
||||
if ((sts == -1 ) && (errno == EINPROGRESS)) {
|
||||
/* if non-blocking connect(), wait until connection
|
||||
successful, discarded or timeout */
|
||||
@@ -750,11 +750,11 @@ static int tcp_connect(struct sockaddr_in dst_addr) {
|
||||
} else if (sts > 0) {
|
||||
/* fd available for write */
|
||||
int valopt;
|
||||
int optlen=sizeof(valopt);
|
||||
socklen_t optlen=sizeof(valopt);
|
||||
|
||||
/* get error status from delayed connect() */
|
||||
if (getsockopt(sock, SOL_SOCKET, SO_ERROR,
|
||||
(void*)(&valopt), &optlen) < 0) {
|
||||
&valopt, &optlen) < 0) {
|
||||
ERROR("getsockopt(SO_ERROR) failed: %s",strerror(errno));
|
||||
close(sock);
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user