-
-
Notifications
You must be signed in to change notification settings - Fork 7k
code: name CURLMcode variables 'mresult', CURLcode variables 'result' #19997
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements a systematic refactoring to improve code clarity by standardizing the naming convention for CURLMcode variables across the libcurl multi interface implementation. The change renames all CURLMcode variables from inconsistent names (result, rc, res, mcode) to the consistent name mresult, making it distinctly different from CURLcode result variables that represent single transfer errors.
Key Changes:
- Standardizes all
CURLMcodevariable names tomresultacross 5 files - No logic changes, purely a refactoring to improve code readability
- Maintains clear distinction between multi interface return codes (
CURLMcode mresult) and single transfer error codes (CURLcode result)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| lib/multi_ntfy.c | Renamed CURLMcode result to mresult in notification dispatch function |
| lib/multi_ev.c | Renamed CURLMcode res and result to mresult in event assessment functions |
| lib/multi.c | Extensive renaming from rc, result, and res to mresult across all multi interface functions including state machine handlers, multi_wait, multi_socket, and multi_perform |
| lib/http2.c | Renamed CURLMcode rc to mresult in HTTP/2 push promise handler |
| lib/easy.c | Renamed CURLMcode mcode to mresult in easy interface wrapper functions |
Review Result: No issues found. This is a clean refactoring that successfully achieves its goal of improving code consistency and clarity. All variable references have been properly updated, and no logic changes were introduced.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
augment review |
There was a problem hiding this 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.
|
Mind if I do the same for examples, docs and tests? |
|
Hehe, thinking alike. I have such edits pending here! |
d8eee8d to
f22a724
Compare
4746e08 to
83394eb
Compare
To make it distinctly different from 'result' and keep consistency betwen functions.
36ef9d5 to
69c3b18
Compare
b31b678 to
11fa692
Compare
To make it distinctly different from 'result' and keep consistency betwen functions.