Skip to content

Commit

Permalink
extra check to silence the static analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
xant committed Jul 16, 2015
1 parent 98c5113 commit 9f8b302
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/linklist.c
Original file line number Diff line number Diff line change
Expand Up @@ -1160,9 +1160,9 @@ list_quick_sort(list_entry_t *head,
int l2 = length - (l1 + 1);
int i;
list_entry_t *pv1 = head, *pv2 = tail;
for (i = 0; pv1->next && i < l1/2; ++i)
for (i = 0; pv1 && pv1->next && i < l1/2; ++i)
pv1 = pv1->next;
for (i = 0; pv2->prev && i < l2/2; ++i)
for (i = 0; pv2 && pv2->prev && i < l2/2; ++i)
pv2 = pv2->prev;

// recursion here
Expand Down

0 comments on commit 9f8b302

Please sign in to comment.