FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 06-14-2011, 06:09 PM
Rémy Oudompheng
 
Default Alpm pkg accessors: ensure pkg argument is non-NULL

On 2011/6/14 Dan McGee <dan@archlinux.org> wrote:
> *alpm_list_t SYMEXPORT *alpm_pkg_get_provides(pmpkg_t *pkg)
> *{
> + * * * ASSERT(pkg != NULL, return NULL);
> * * * *pkg->handle->pm_errno = 0;
> * * * *return pkg->ops->get_provides(pkg);
> *}

Hello Dan,

In this patch we should really set pkg->handle->errno to something:
either PM_ERR_WRONG_ARGS or create a PM_ERR_PKG_NULL for this purpose,
especially for all functions that return an alpm_list_t where NULL
already means "empty list". I guess it supports the idea of having a
handle in the package.

--
Rémy.
 

Thread Tools




All times are GMT. The time now is 06:47 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org