7 Aug
2008
7 Aug
'08
3:23 p.m.
for me it is a problem with alpm_list_remove but i am not an expert. look at this #include <alpm.h> int compare_int(const void *a, const void *b) { const int* ia = (const int *)a; const int* ib = (const int *)b; return (*ia > *ib) - (*ia < *ib); } int main(void) { alpm_list_t *l=NULL; int a=2,a2=2; l= alpm_list_add(l, &a); l= alpm_list_add(l, &a2); void **data=NULL; l = alpm_list_remove(l, &a, compare_int, data); puts("still ok ?"); void **data2; l = alpm_list_remove(l, &a2, compare_int, data2); return 0; } it only seg fault at the second alpm_list_remove