-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Fixes #4247: remove unnecessary nullptr checks #4248
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. The changes are okay, but I noticed that you did not set your full name in Git (and / or on GitHub). Do you want to fix that before your pull request gets merged?
See https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup if you need instructions how to do that.
Thanks a lot! I have set my full name on Github. |
…inueContext Signed-off-by: Stefan Weil <sw@weilnetz.de>
Related report from Coverity Scan: CID 1438675 Dereference after null check. |
} | ||
prefix.Set(p, previous->code); | ||
full_code.Set(p, previous->code); | ||
previous = previous->prev; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this statement here because otherwise the for statement would have required a line break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this statement here because otherwise the for statement would have required a line break.
I think placing previous = previous->prev
here or within the for
statement is equivalent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
Related: Codacy issue #4248. |
See #4247