[pacman-dev] Incoherent alpm_list_t usage in deps.c

Nagy Gabor ngaba at bibl.u-szeged.hu
Sat May 3 11:31:56 EDT 2008


Both resolvedeps and recursedeps populates its input list; however,
resolvedeps has alpm_list_t**, recursedeps has alpm_list_t* param.

First I thought that the return value of alpm_list_add is needless,
since we add the new element to the end of the list. But, when the list
is empty (thus the passed param is NULL), the return value is important.

Neither of the mentioned functions should populate its input list, if
it is empty; so both * and ** seems to be correct (however, by
definition, resolvedeps could populate an empty list, but - after
DEPENDSONLY removal - syncpkg is always a member of *list).


More information about the pacman-dev mailing list