Skip to content

Commit ea6eb57

Browse files
committed
optimize: rm redundant code
1 parent f7ede87 commit ea6eb57

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

event/hloop.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -992,16 +992,7 @@ hio_t* hio_create_socket(hloop_t* loop, const char* host, int port, hio_type_e t
992992
if (sock_type == -1) return NULL;
993993
sockaddr_u addr;
994994
memset(&addr, 0, sizeof(addr));
995-
int ret = -1;
996-
#ifdef ENABLE_UDS
997-
if (port < 0) {
998-
sockaddr_set_path(&addr, host);
999-
ret = 0;
1000-
}
1001-
#endif
1002-
if (port >= 0) {
1003-
ret = sockaddr_set_ipport(&addr, host, port);
1004-
}
995+
int ret = sockaddr_set_ipport(&addr, host, port);
1005996
if (ret != 0) {
1006997
// fprintf(stderr, "unknown host: %s\n", host);
1007998
return NULL;

0 commit comments

Comments
 (0)