damn it, fucked up the return value
This commit is contained in:
parent
6e022f98c9
commit
1856c8a2d7
@ -11,7 +11,7 @@
|
||||
int socket_tcp4(void) {
|
||||
int s;
|
||||
#ifdef SOCK_NONBLOCK
|
||||
if ((s=socket(PF_INET,SOCK_STREAM|SOCK_NONBLOCK,IPPROTO_TCP))>-1 || errno!=EINVAL) return -1;
|
||||
if ((s=socket(PF_INET,SOCK_STREAM|SOCK_NONBLOCK,IPPROTO_TCP))>-1 || errno!=EINVAL) return s;
|
||||
#endif
|
||||
s=socket_tcp4b();
|
||||
if (s==-1) return -1;
|
||||
|
@ -12,7 +12,7 @@
|
||||
int socket_tcp6(void) {
|
||||
int s;
|
||||
#if defined(LIBC_HAS_IP6) && defined(SOCK_NONBLOCK)
|
||||
if ((s=socket(PF_INET6,SOCK_STREAM|SOCK_NONBLOCK,IPPROTO_TCP))>-1 || errno!=EINVAL) return -1;
|
||||
if ((s=socket(PF_INET6,SOCK_STREAM|SOCK_NONBLOCK,IPPROTO_TCP))>-1 || errno!=EINVAL) return s;
|
||||
#endif
|
||||
s=socket_tcp6b();
|
||||
if (s==-1) return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user