Skip to content

tool: return code variable consistency#20426

Closed
bagder wants to merge 1 commit intomasterfrom
bagder/tool-name-consistency
Closed

tool: return code variable consistency#20426
bagder wants to merge 1 commit intomasterfrom
bagder/tool-name-consistency

Conversation

@bagder
Copy link
Member

@bagder bagder commented Jan 25, 2026

  • ParameterError variables are named 'err'
  • CURLcode variables are named 'result'

For naming consistency across functions

- ParameterError variables are named 'err'
- CURLcode variables are named 'result'

For naming consistency across functions
@bagder bagder marked this pull request as ready for review January 25, 2026 10:47
@bagder
Copy link
Member Author

bagder commented Jan 25, 2026

augment review

@augmentcode
Copy link

augmentcode bot commented Jan 25, 2026

🤖 Augment PR Summary

Summary: Normalizes local error/return-code variable naming in curl’s tool sources for consistency.

Changes:

  • Renamed local CURLcode variables from ret/res/r to result across several helper functions.
  • Renamed local ParameterError variables from result/res to err (e.g., argument parsing and numeric parsing helpers).
  • Adjusted related control-flow checks and logging statements to use the new identifiers.

Technical Notes: This is a naming-only refactor intended to preserve behavior while making it clearer which values are libcurl CURLcode results vs. tool parameter parsing errors.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@bagder bagder closed this in d0dc6e2 Jan 25, 2026
@bagder bagder deleted the bagder/tool-name-consistency branch January 25, 2026 14:59
vszakats added a commit that referenced this pull request Jan 26, 2026
For consistency.

Also:
- one remaining in `src/tool_writeout.c`.
- replace casting an `int` to `CURLcode`.
- lib758: rename `CURLMcode` `result` to `mresult`.
- move literals to the right side of if expressions.

Follow-up to d0dc6e2 #20426
Follow-up to 56f600e

Closes #20432
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant