Skip to content
Snippets Groups Projects
Commit 5b1cd047 authored by Sebastian Meiling's avatar Sebastian Meiling
Browse files

core/clist: add cppcheck-suppress nullPointer

This was found by cppcheck 1.6x used in Travis-CI, however this
seems to be a false positive, as it is not found by newer versions
of cppcheck.
parent d7942cd9
No related branches found
No related tags found
No related merge requests found
...@@ -78,6 +78,8 @@ clist_node_t *_clist_sort(clist_node_t *list, clist_cmp_func_t cmp) ...@@ -78,6 +78,8 @@ clist_node_t *_clist_sort(clist_node_t *list, clist_cmp_func_t cmp)
for (i = 0; i < insize; i++) { for (i = 0; i < insize; i++) {
psize++; psize++;
q = (q->next == oldhead) ? NULL : q->next; q = (q->next == oldhead) ? NULL : q->next;
/* cppcheck-suppress nullPointer
* (reason: possible bug in cppcheck 1.6x) */
if (!q) { if (!q) {
break; break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment