* 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 */
| 339 | * Returns 1 if a deallocation occurred, or 0 if not found |
| 340 | */ |
| 341 | int |
| 342 | xmlListRemoveFirst(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: |
no test coverage detected