Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   fixed coding standard violation (http://www.linux-archive.org/archlinux-pacman-development/689276-fixed-coding-standard-violation.html)

Dave Reisner 07-31-2012 06:32 PM

fixed coding standard violation
 
On Tue, Jul 31, 2012 at 09:24:29PM +0300, Barbu Paul - Gheorghe wrote:
> Signed-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com>
> ---
> lib/libalpm/db.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
> index bf9c3f0..63d18be 100644
> --- a/lib/libalpm/db.c
> +++ b/lib/libalpm/db.c
> @@ -136,8 +136,13 @@ alpm_list_t SYMEXPORT *alpm_db_get_servers(const alpm_db_t *db)
> int SYMEXPORT alpm_db_set_servers(alpm_db_t *db, alpm_list_t *servers)
> {
> ASSERT(db != NULL, return -1);
> - if(db->servers) FREELIST(db->servers);
> +
> + if(db->servers){

This in itself violates the standards. Space between the closing paren
and opening brace. Personally, I would have just discarded the if, since
the functions that FREELIST calls are all NULL safe.

> + FREELIST(db->servers);
> + }
> +
> db->servers = servers;
> +
> return 0;
> }
>
> --
> Barbu Paul - Gheorghe
> Common sense is not so common - Voltaire
> Visit My GitHub profile to see my open-source projects - https://github.com/paullik
>
>


All times are GMT. The time now is 07:20 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.