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

pcp: fix cppcheck warning #540

Merged
merged 1 commit into from
Sep 22, 2022
Merged

pcp: fix cppcheck warning #540

merged 1 commit into from
Sep 22, 2022

Conversation

alfredh
Copy link
Contributor

@alfredh alfredh commented Sep 22, 2022

cppcheck --version
Cppcheck 2.3

src/pcp/request.c:115:13: warning: Possible null pointer dereference: msg [nullPointer]
 if (err || msg->hdr.result != PCP_SUCCESS ) {
            ^
src/pcp/request.c:141:29: note: Calling function 'completed', 3rd argument 'NULL' value is 0
  completed(req, ETIMEDOUT, NULL);
                            ^
src/pcp/request.c:115:13: note: Null pointer dereference
 if (err || msg->hdr.result != PCP_SUCCESS ) {
            ^

src/pcp/request.c:115:13: warning: Possible null pointer dereference: msg [nullPointer]
 if (err || msg->hdr.result != PCP_SUCCESS ) {
            ^
src/pcp/request.c:141:29: note: Calling function 'completed', 3rd argument 'NULL' value is 0
  completed(req, ETIMEDOUT, NULL);
                            ^
src/pcp/request.c:115:13: note: Null pointer dereference
 if (err || msg->hdr.result != PCP_SUCCESS ) {
            ^
@sreimers sreimers merged commit 9409513 into main Sep 22, 2022
@sreimers sreimers deleted the pcp_cppcheck branch September 22, 2022 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants