A couple of cosmetic fixed to please Coverity scan where it makes some sense - #527
Merged
Merged
Conversation
Fixes following warning: ``` c-ares-1.19.1/src/lib/ares__readaddrinfo.c:69: cond_const: Condition "(status = ares__read_line(fp, &line, &linesize)) == 0", taking true branch. Now the value of "status" is equal to 0. c-ares-1.19.1/src/lib/ares__readaddrinfo.c:181: cond_const: Condition "status != 0", taking false branch. Now the value of "status" is equal to 0. c-ares-1.19.1/src/lib/ares__readaddrinfo.c:193: cond_const: Condition "status != 0", taking false branch. Now the value of "status" is equal to 0. c-ares-1.19.1/src/lib/ares__readaddrinfo.c:200: const: At condition "status != 0", the value of "status" must be equal to 0. c-ares-1.19.1/src/lib/ares__readaddrinfo.c:200: dead_error_condition: The condition "status != 0" cannot be true. c-ares-1.19.1/src/lib/ares__readaddrinfo.c:202: dead_error_line: Execution cannot reach this statement: "continue;". 200| if (status != ARES_SUCCESS) 201| /* Ignore line if invalid address string for the requested family. */ 202|-> continue; 203| 204| if (want_cname) ```
Fixes following warning: ``` c-ares-1.19.1/src/lib/ares_parse_uri_reply.c:91: cond_const: Condition "status != 0", taking false branch. Now the value of "status" is equal to 0. c-ares-1.19.1/src/lib/ares_parse_uri_reply.c:155: const: At condition "status != 0", the value of "status" must be equal to 0. c-ares-1.19.1/src/lib/ares_parse_uri_reply.c:155: dead_error_condition: The condition "status != 0" cannot be true. c-ares-1.19.1/src/lib/ares_parse_uri_reply.c:156: dead_error_line: Execution cannot reach this statement: "break;". 154| 155| if (status != ARES_SUCCESS) 156|-> break; 157| } 158| ```
b1fe351 merely pushed null ptr deref to a next line. Fixes following warning: ``` Error: FORWARD_NULL (CWE-476): c-ares-1.19.1/src/lib/ares_getaddrinfo.c:827: var_compare_op: Comparing "hquery->name" to null implies that "hquery->name" might be null. c-ares-1.19.1/src/lib/ares_getaddrinfo.c:828: alias_transfer: Assigning: "p" = "hquery->name". c-ares-1.19.1/src/lib/ares_getaddrinfo.c:828: var_deref_op: Dereferencing null pointer "p". 826| int ndots = 0; 827| size_t nname = hquery->name?strlen(hquery->name):0; 828|-> for (p = hquery->name; *p; p++) 829| { 830| if (*p == '.') ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.