yjhjstz commented on code in PR #1829:
URL: https://github.com/apache/cloudberry/pull/1829#discussion_r3481373615


##########
contrib/interconnect/udp/ic_udpifc.c:
##########
@@ -8208,7 +8192,6 @@ SendDummyPacket(void)
                pg_freeaddrinfo_all(hint.ai_family, addrs);
        if (sockfd != -1)
                closesocket(sockfd);
-       return;

Review Comment:
   It's generally recommended to keep the final return; when a function already 
contains multiple early return; statements. This keeps the control flow 
consistent and makes the code easier to read.
   ```c++
   static void
   foo(...)
   {
       if (a == NULL)
           return;
   
       if (b == NULL)
           return;
   
       ...
   
       return;
   }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to