Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added a quick check condition for GetStatusFromCode void#122053

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
lighting9999 wants to merge3 commits intodotnet:mainfromlighting9999:patch-1

Conversation

@lighting9999
Copy link

Enhance GetStatusFromCode method with detailed XML documentation, clarifying the handling of Windows ICMP status codes and exceptions.

Enhance GetStatusFromCode method with detailed XML documentation, clarifying the handling of Windows ICMP status codes and exceptions.
@dotnet-policy-servicedotnet-policy-servicebot added the community-contributionIndicates that the PR has been added by a community member labelNov 29, 2025
@lighting9999
Copy link
Author

@dotnet-policy-service agree

@lighting9999lighting9999 changed the titleAdd and change GetStatusFromCodeAddif( statuscode==0) code to change GetStatusFromCodeNov 29, 2025
@lighting9999lighting9999 changed the titleAddif( statuscode==0) code to change GetStatusFromCodeAddif(statuscode==0) code to change GetStatusFromCodeNov 29, 2025
@am11
Copy link
Member

GetStatusFromCode is a private 'ensure' method which doesn't need XML document, and certainly not elaborate one.

Add if(statuscode==0) code to change GetStatusFromCode

It doesn't improve the codegen for statuscode==0.

@lighting9999lighting9999 changed the titleAddif(statuscode==0) code to change GetStatusFromCodeAdded a quick check condition for GetStatusFromCodeNov 29, 2025
@lighting9999lighting9999 changed the titleAdded a quick check condition for GetStatusFromCodeAdded a quick check condition for GetStatusFromCode voidNov 29, 2025
@huoyaoyuan
Copy link
Member

huoyaoyuan commentedNov 29, 2025
edited
Loading

There is no performance change, and only makes the code bigger.statusCode != 0 is tested in the first instruction of theif condition, and the cast(IPStatus)statusCode is zero cost.

The comments are trivial with unnecessary statements. The pull request doesn't provide any value.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

area-System.Netcommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@lighting9999@am11@huoyaoyuan

[8]ページ先頭

©2009-2025 Movatter.jp