[pacman-dev] There is a "problem" with list->prev tail pointer

Nagy Gabor ngaba at bibl.u-szeged.hu
Tue Nov 20 10:46:01 EST 2007

Look at the following code-part:

for(i = list; i; i = i->next) {
        alpm_list_foo(i); /*WARNING!!*/

So a node in a list (i in the example) is NOT a valid alpm_list_t:
You can do alpm_list_getdata for example, but not alpm_list_add.
This is very confusing to me.
We should somehow differeniate between alpm_list_t and alpm_list_node_t types,
so at least force the compiler to give a warning message.


SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/

More information about the pacman-dev mailing list