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

src: use ARES_SUCCESS instead of 0 #48834

Merged
merged 1 commit into from
Jul 23, 2023

Conversation

illusi0n7
Copy link
Contributor

Since error messages are also using defined values, it is more clear to use the defined value even when the operation succeeds.

Since error messages are also using defined values, it is more clear
to use the defined value even when the operation succeeds.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. needs-ci PRs that need a full CI run. labels Jul 19, 2023
@ShogunPanda
Copy link
Contributor

Is ARES_SUCCESS defined as 0?

@illusi0n7
Copy link
Contributor Author

sure. like this.

// ares.h
#define ARES_SUCCESS 0

@ShogunPanda
Copy link
Contributor

I guess I'm fine with it then!

@illusi0n7
Copy link
Contributor Author

illusi0n7 commented Jul 19, 2023

And return value is compared with ARES_SUCCESS in cares_wrap.h

//cares_wrap.h
status = Traits::Parse(this, response_data_);
if (status != ARES_SUCCESS)
  ParseError(status);

@ShogunPanda ShogunPanda added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 19, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 19, 2023
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

@daeyeon daeyeon added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 20, 2023
@lpinca lpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 23, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 23, 2023
@nodejs-github-bot nodejs-github-bot merged commit 841b29c into nodejs:main Jul 23, 2023
68 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 841b29c

Ceres6 pushed a commit to Ceres6/node that referenced this pull request Jul 27, 2023
Since error messages are also using defined values, it is more clear
to use the defined value even when the operation succeeds.

PR-URL: nodejs#48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
pluris pushed a commit to pluris/node that referenced this pull request Aug 6, 2023
Since error messages are also using defined values, it is more clear
to use the defined value even when the operation succeeds.

PR-URL: nodejs#48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
pluris pushed a commit to pluris/node that referenced this pull request Aug 7, 2023
Since error messages are also using defined values, it is more clear
to use the defined value even when the operation succeeds.

PR-URL: nodejs#48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Since error messages are also using defined values, it is more clear
to use the defined value even when the operation succeeds.

PR-URL: nodejs#48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Since error messages are also using defined values, it is more clear
to use the defined value even when the operation succeeds.

PR-URL: nodejs#48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
UlisesGascon pushed a commit to UlisesGascon/node that referenced this pull request Aug 14, 2023
Since error messages are also using defined values, it is more clear
to use the defined value even when the operation succeeds.

PR-URL: nodejs#48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Aug 15, 2023
Since error messages are also using defined values, it is more clear
to use the defined value even when the operation succeeds.

PR-URL: #48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
@UlisesGascon UlisesGascon mentioned this pull request Aug 15, 2023
nodejs-github-bot pushed a commit that referenced this pull request Aug 20, 2023
PR-URL: #49048
Refs: #48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
UlisesGascon pushed a commit that referenced this pull request Sep 10, 2023
PR-URL: #49048
Refs: #48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
targos pushed a commit that referenced this pull request Nov 27, 2023
Since error messages are also using defined values, it is more clear
to use the defined value even when the operation succeeds.

PR-URL: #48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
targos pushed a commit that referenced this pull request Nov 27, 2023
PR-URL: #49048
Refs: #48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
Since error messages are also using defined values, it is more clear
to use the defined value even when the operation succeeds.

PR-URL: nodejs/node#48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
PR-URL: nodejs/node#49048
Refs: nodejs/node#48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
Since error messages are also using defined values, it is more clear
to use the defined value even when the operation succeeds.

PR-URL: nodejs/node#48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
PR-URL: nodejs/node#49048
Refs: nodejs/node#48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants