[pacman-dev] [PATCH] Handle null pkgcache for db_populate, refactor hash

Dan McGee dpmcgee at gmail.com
Mon Feb 7 17:13:23 EST 2011


On Mon, Feb 7, 2011 at 3:51 PM, Pang Yan Han <pangyanhan at gmail.com> wrote:
> On Mon, Feb 07, 2011 at 09:44:39AM -0600, Dan McGee wrote:
>> On Mon, Feb 7, 2011 at 8:59 AM, Pang Yan Han <pangyanhan at gmail.com> wrote:
>> > For this purpose, PM_ERR_DB_PKGCACHE_NULL error is added to
>> > _pmerrno_t and taken care of in alpm_strerror().
>> -1 on adding another error code that means nothing to a front-end
>> user. PM_ERR_MEMORY is already set in two of the three NULL exit
>> cases; we should set that in the third as well as greater than maximum
>> size might as well be a memory issue.
>>
> So I guess it's ok to set pmerrno to PM_ERR_MEMORY?

Yeah, I'd be fine with that error code getting reused here.

-Dan


More information about the pacman-dev mailing list