1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

libDtSearch: Coverity 86602

This commit is contained in:
Peter Howkins 2018-07-02 23:23:44 +01:00
parent 96c6c5068a
commit 7ecbdc866c

View file

@ -237,9 +237,12 @@ LLIST *cutnode_llist (LLIST * node, LLIST ** llistp)
*/
static LLIST *split_llist (LLIST * lst)
{
LLIST *tail = lst->link;
if (lst == NULL || tail == NULL)
LLIST *tail;
if (lst == NULL || lst->link)
return lst;
tail = lst->link;
/* advance 'tail' to end of list, and advance 'lst' only half as often */
while ((tail != NULL) && ((tail = tail->link) != NULL)) {
lst = lst->link;