-
Notifications
You must be signed in to change notification settings - Fork 63
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
addressed 'NULL' issue in ccnl_i_prefixof_c #297
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.
This one looks good to me
src/ccnl-core/include/ccnl-prefix.h
Outdated
* @return 0 if full match | ||
* @return n>0 for matched components | ||
*/ | ||
int | ||
ccnl_i_prefixof_c(struct ccnl_prefix_s *prefix, | ||
int ccnl_i_prefixof_c(struct ccnl_prefix_s *prefix, |
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 am wondering about this re-alignement here. All other signatures start with the return type and the function name in the below line.
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.
We probably should start to talk about a style guide soon.
4b35a1c
to
cc66c64
Compare
src/ccnl-core/include/ccnl-prefix.h
Outdated
* @return 0 if full match | ||
* @return n>0 for matched components | ||
*/ | ||
int | ||
int |
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.
why is here an extra whitespace?
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.
😍
cc66c64
to
1401c21
Compare
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.
ACK
1401c21
to
2500074
Compare
Contribution description
This issue was identified by clangs static analyzer ("argument with 'nonnull' attribute passed null"). If the check in
would fail, the subsequent call to
might also fail (i.e.
md
isNULL
).