This is an automated email from the ASF dual-hosted git repository.
tuhaihe pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/main by this push:
new 83022b58b2f Enhancement: Remove redundant return statements in UDP
interconnect code
83022b58b2f is described below
commit 83022b58b2f4e62fb8fd2ebf9137b5c29e4fcb5b
Author: Sagittarius <[email protected]>
AuthorDate: Thu Jul 23 08:55:47 2026 +0300
Enhancement: Remove redundant return statements in UDP interconnect code
In C, reaching the closing brace of a void function implicitly returns
control to the caller. Explicit 'return;' statements in these positions
are unnecessary noise that clutters the code. Removing them aligns the
code with common C style guidelines and improves readability.
---------
Co-authored-by: Leonid <[email protected]>
---
contrib/interconnect/udp/ic_udpifc.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/contrib/interconnect/udp/ic_udpifc.c
b/contrib/interconnect/udp/ic_udpifc.c
index 47c6273470c..0f26d73f936 100644
--- a/contrib/interconnect/udp/ic_udpifc.c
+++ b/contrib/interconnect/udp/ic_udpifc.c
@@ -1381,8 +1381,6 @@ addCursorIcEntry(CursorICHistoryTable *t, uint32 icId,
uint32 cid)
t->count++;
elog(DEBUG2, "add icid %d cid %d status %d", p->icId, p->cid,
p->status);
-
- return;
}
/*
@@ -1770,7 +1768,6 @@ error:
(errcode(ERRCODE_GP_INTERCONNECTION_ERROR),
errmsg("interconnect error: Could not set up udp
listener socket"),
errdetail("%s: %m", fun)));
- return;
}
/*
@@ -1806,8 +1803,6 @@ ic_set_pthread_sigmasks(sigset_t *old_sigs)
#else
(void) old_sigs;
#endif
-
- return;
}
static void
@@ -1822,8 +1817,6 @@ ic_reset_pthread_sigmasks(sigset_t *sigs)
#else
(void) sigs;
#endif
-
- return;
}
void
@@ -1945,7 +1938,6 @@ InitMotionUDPIFC(int *listenerSocketFd, int32
*listenerPort)
}
ic_control_info.threadCreated = true;
- return;
}
void
@@ -4878,8 +4870,6 @@ markUDPConnInactiveIFC(MotionConn *conn)
pthread_mutex_lock(&ic_control_info.lock);
conn->stillActive = false;
pthread_mutex_unlock(&ic_control_info.lock);
-
- return;
}
void
@@ -8208,7 +8198,6 @@ send_error:
pg_freeaddrinfo_all(hint.ai_family, addrs);
if (sockfd != -1)
closesocket(sockfd);
- return;
}
void logChunkParseDetails(MotionConn *conn, uint32 ic_instance_id)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]