Skip to content

Remove redundant return statements in UDP interconnect code#1829

Open
MutableFire wants to merge 3 commits into
apache:mainfrom
MutableFire:returns-remove
Open

Remove redundant return statements in UDP interconnect code#1829
MutableFire wants to merge 3 commits into
apache:mainfrom
MutableFire:returns-remove

Conversation

@MutableFire

@MutableFire MutableFire commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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.

@tuhaihe

tuhaihe commented Jun 24, 2026

Copy link
Copy Markdown
Member

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.

Hi @MutableFire welcome to add these description to the commit message body.

Can take the .gitmessage as a commit template, FYI.

@MutableFire MutableFire force-pushed the returns-remove branch 5 times, most recently from 809681e to ec51c28 Compare June 24, 2026 09:44
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.
@MutableFire

Copy link
Copy Markdown
Contributor Author

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.

Hi @MutableFire welcome to add these description to the commit message body.

Can take the .gitmessage as a commit template, FYI.

Done.

Comment thread contrib/interconnect/udp/ic_udpifc.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants