Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove redundant assignments #634

Merged
merged 1 commit into from
Sep 14, 2024
Merged

refactor: remove redundant assignments #634

merged 1 commit into from
Sep 14, 2024

Conversation

Integral-Tech
Copy link
Contributor

Background

There are some redundant assignments in control/kern/tproxy.c.

  • Assigning the 2nd & 3rd enumeration constant by 2 and 3 is unnecessary. If an enumeration constant is not followed by = constant-expression, its value is the value one greater than the value of the previous enumerator in the same enumeration.
  • The variable ret is not used after being assigned.
  • When to_read == MAX_ARG_SCANNER_BUFFER_SIZE, the assignment is unnecessary.

Checklist

Full Changelogs

  • Remove redundant assignments in in control/kern/tproxy.c

Test Result

Copy link
Contributor

@mzz2017 mzz2017 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@dae-prow dae-prow bot left a comment

Choose a reason for hiding this comment

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

🧪 Since the PR has been fully tested, please consider merging it.

@mzz2017 mzz2017 merged commit 903b595 into daeuniverse:main Sep 14, 2024
27 checks passed
@Integral-Tech Integral-Tech deleted the refactor-remove-assign branch September 14, 2024 05:29
mnixry pushed a commit to mnixry/dae that referenced this pull request Sep 18, 2024
@dae-prow dae-prow bot mentioned this pull request Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants