26 Nov
2007
26 Nov
'07
11:44 p.m.
On Nov 26, 2007 5:31 PM, Xavier <shiningxc@gmail.com> wrote:
Does it still look OK by using pm_errno instead of ret?
MALLOC(miss, sizeof(pmdepmissing_t), pm_errno = PM_ERR_MEMORY); if(om_errno == PM_ERR_MEMORY) { /* free the lists */ ret = -1; goto cleanup; }
I'm asking because I noticed MALLOC could be used in resolvedeps too, but there isn't already a ret variable there :) I made this change for resolvedeps in my working branch, and for sync_prepare in my sync branch.
You could also always just check if(!miss), which is what I'd do. That's why I mentioned just doing nothing in the third param. Either way it's the same thing, so just do what you're comfortable with.