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:
parent
96c6c5068a
commit
7ecbdc866c
1 changed files with 5 additions and 2 deletions
|
@ -237,9 +237,12 @@ LLIST *cutnode_llist (LLIST * node, LLIST ** llistp)
|
||||||
*/
|
*/
|
||||||
static LLIST *split_llist (LLIST * lst)
|
static LLIST *split_llist (LLIST * lst)
|
||||||
{
|
{
|
||||||
LLIST *tail = lst->link;
|
LLIST *tail;
|
||||||
if (lst == NULL || tail == NULL)
|
if (lst == NULL || lst->link)
|
||||||
return lst;
|
return lst;
|
||||||
|
|
||||||
|
tail = lst->link;
|
||||||
|
|
||||||
/* advance 'tail' to end of list, and advance 'lst' only half as often */
|
/* advance 'tail' to end of list, and advance 'lst' only half as often */
|
||||||
while ((tail != NULL) && ((tail = tail->link) != NULL)) {
|
while ((tail != NULL) && ((tail = tail->link) != NULL)) {
|
||||||
lst = lst->link;
|
lst = lst->link;
|
||||||
|
|
Loading…
Reference in a new issue