egcs 'ambiguous else' warnings fixes.
diff --git a/misc/winsock.c b/misc/winsock.c
index 0fb8a1a..dbf45ef 100644
--- a/misc/winsock.c
+++ b/misc/winsock.c
@@ -500,9 +500,11 @@
int _check_ws(LPWSINFO pwsi, ws_socket* pws)
{
if( pwsi )
+ {
if( pwsi->flags & WSI_BLOCKINGCALL ) pwsi->err = WSAEINPROGRESS;
else if( WSI_CHECK_RANGE(pwsi, pws) ) return 1;
else pwsi->err = WSAENOTSOCK;
+ }
return 0;
}
@@ -611,8 +613,11 @@
#endif
if ( _check_ws(pwsi, pws) )
+ {
if ( namelen >= sizeof(*name) )
+ {
if ( ((struct ws_sockaddr_in *)name)->sin_family == AF_INET )
+ {
if ( bind(pws->fd, name, namelen) < 0 )
{
int loc_errno = errno;
@@ -626,8 +631,11 @@
}
}
else return 0; /* success */
+ }
else pwsi->err = WSAEAFNOSUPPORT;
+ }
else pwsi->err = WSAEFAULT;
+ }
return SOCKET_ERROR;
}