MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlListRemoveFirst

Function xmlListRemoveFirst

ThirdParty/libxml2/vtklibxml2/list.c:341–355  ·  view source on GitHub ↗

* xmlListRemoveFirst: * @l: a list * @data: list data * * Remove the first instance associated to data in the list * * Returns 1 if a deallocation occurred, or 0 if not found */

Source from the content-addressed store, hash-verified

339 * Returns 1 if a deallocation occurred, or 0 if not found
340 */
341int
342xmlListRemoveFirst(xmlListPtr l, void *data)
343{
344 xmlLinkPtr lk;
345
346 if (l == NULL)
347 return(0);
348 /*Find the first instance of this data */
349 lk = xmlListLinkSearch(l, data);
350 if (lk != NULL) {
351 xmlLinkDeallocator(l, lk);
352 return 1;
353 }
354 return 0;
355}
356
357/**
358 * xmlListRemoveLast:

Callers 2

xmlWalkRemoveRefFunction · 0.85
xmlListRemoveAllFunction · 0.85

Calls 2

xmlListLinkSearchFunction · 0.85
xmlLinkDeallocatorFunction · 0.85

Tested by

no test coverage detected