Skip to content

Conversation

@bagder
Copy link
Member

@bagder bagder commented Dec 16, 2025

To make it distinctly different from 'result' and keep consistency betwen functions.

@bagder bagder added the tidy-up label Dec 16, 2025
@bagder bagder marked this pull request as ready for review December 16, 2025 12:11
@bagder bagder requested a review from Copilot December 16, 2025 12:11
Copy link

Copilot AI left a 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 CURLMcode variable names to mresult across 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.

@bagder
Copy link
Member Author

bagder commented Dec 16, 2025

augment review

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.

@vszakats
Copy link
Member

Mind if I do the same for examples, docs and tests?

@bagder
Copy link
Member Author

bagder commented Dec 16, 2025

Hehe, thinking alike. I have such edits pending here!

@bagder bagder changed the title lib: name the main CURLMcode variable 'mresult' code: name CURLMcode variables 'mresult', CURLcode variables 'result' Dec 16, 2025
To make it distinctly different from 'result' and keep consistency
betwen functions.
@bagder bagder closed this in 0a26e3a Dec 17, 2025
@bagder bagder deleted the bagder/mresult branch December 17, 2025 07:55
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.

2 participants