Skip to content

Commit

Permalink
remove redudant returns
Browse files Browse the repository at this point in the history
  • Loading branch information
var77 committed Sep 23, 2024
1 parent b18a140 commit 54d7f39
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/hnsw/external_index_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,10 @@ static void wait_for_data(external_index_socket_t *socket_con)
int flags = fcntl(socket_con->fd, F_GETFL, 0);
if(flags == -1) {
elog(ERROR, "error getting socket flags");
return;
}

if(fcntl(socket_con->fd, F_SETFL, flags | O_NONBLOCK) == -1) {
elog(ERROR, "error setting socket to non-blocking mode");
return;
}

while(1) {
Expand All @@ -159,7 +157,6 @@ static void wait_for_data(external_index_socket_t *socket_con)
if(activity < 0) {
snprintf((char *)&errstr, EXTERNAL_INDEX_MAX_ERR_SIZE, "%s", strerror(errno));
elog(ERROR, "select syscall error: %s", errstr);
return;
}

// If socket has data to read
Expand Down Expand Up @@ -244,7 +241,6 @@ static void check_external_index_response_status(external_index_socket_t *socket

if(bytes_read < 0) {
elog(ERROR, "external index socket read failed");
return;
}

total_bytes_read += bytes_read;
Expand Down

0 comments on commit 54d7f39

Please sign in to comment.