Commit cf72f532 authored by Rémi Duraffort's avatar Rémi Duraffort

xtag: simplify (remove a dummy test and makes some static code analyser happy).

parent 3d6f02e6
...@@ -361,13 +361,12 @@ static XList *xlist_append( XList *list, void *data ) ...@@ -361,13 +361,12 @@ static XList *xlist_append( XList *list, void *data )
if( !list ) if( !list )
return l; return l;
for( last = list; last; last = last->next ) /* Find the last element */
{ last = list;
if( !last->next ) while( last->next )
break; last = last->next;
}
if( last ) last->next = l; last->next = l;
l->prev = last; l->prev = last;
return list; return list;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment