Skip to content

Remove redundant return statements in UDP interconnect code - #1829

Merged
tuhaihe merged 4 commits into
apache:mainfrom
MutableFire:returns-remove
Jul 23, 2026
Merged

Remove redundant return statements in UDP interconnect code#1829
tuhaihe merged 4 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
@MutableFire
MutableFire requested a review from yjhjstz July 16, 2026 11:52

@yjhjstz yjhjstz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@leborchuk leborchuk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tuhaihe
tuhaihe merged commit 83022b5 into apache:main Jul 23, 2026
70 of 71 checks passed
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.

4 participants