projects
/
oweals
/
cde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96c6c50
)
libDtSearch: Coverity 86602
author
Peter Howkins
<flibble@users.sf.net>
Mon, 2 Jul 2018 22:23:44 +0000
(23:23 +0100)
committer
Peter Howkins
<flibble@users.sf.net>
Mon, 2 Jul 2018 22:23:44 +0000
(23:23 +0100)
cde/lib/DtSearch/msgutil.c
patch
|
blob
|
history
diff --git
a/cde/lib/DtSearch/msgutil.c
b/cde/lib/DtSearch/msgutil.c
index be66b63716dccb64cb19d296229d4701dcdd14eb..48d27fe9e0f2eae4d8f46052b6c85e22ff37e0f2 100644
(file)
--- a/
cde/lib/DtSearch/msgutil.c
+++ b/
cde/lib/DtSearch/msgutil.c
@@
-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;