[PATCH] Coverity fixes

Guenther Deschner gd at samba.org
Thu Mar 26 07:23:15 MDT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

2nd one also reviewed by me.

Thanks!

Guenther

On 26/03/15 14:11, Michael Adam wrote:
> Both reviewed-by: me
> 
> We need a second reviewer for the second patch.
> 
> Michael
> 
> On 2015-03-26 at 18:27 +0530, Anoop C S wrote:
>> Hi
>> 
>> Reviews are welcomed.
>> 
>> --Anoop C S.
>> 
> 
>>> From cc653e1a07d2eb89c26bb12d08ed0c8248f9cd89 Mon Sep 17
>>> 00:00:00 2001
>> From: Anoop C S <achiraya at redhat.com> Date: Thu, 26 Mar 2015
>> 14:05:19 +0530 Subject: [PATCH] libnetapi: Fix 241166 Fixing
>> logically dead code
>> 
>> Signed-off-by: Anoop C S <achiraya at redhat.com> Reviewed-by:
>> Guenther Deschner <gd at samba.org> --- source3/lib/netapi/user.c |
>> 3 --- 1 file changed, 3 deletions(-)
>> 
>> diff --git a/source3/lib/netapi/user.c
>> b/source3/lib/netapi/user.c index 6324084..bb598be 100644 ---
>> a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@
>> -1201,9 +1201,6 @@ static NTSTATUS
>> libnetapi_samr_lookup_user_map_USER_INFO(TALLOC_CTX *mem_ctx, }
>> 
>> switch (level) { -		case 0: -			/* already returned above */ -
>> break; case 1: status = info21_to_USER_INFO_1(mem_ctx, info21,
>> &info1); NT_STATUS_NOT_OK_RETURN(status); -- 2.1.0
>> 
>> 
> 
>>> From 67e9afc7dc9646108fd629a29dd3db6d70df3b43 Mon Sep 17
>>> 00:00:00 2001
>> From: Anoop C S <achiraya at redhat.com> Date: Thu, 26 Mar 2015
>> 18:06:44 +0530 Subject: [PATCH] registry: Fix 1273042 Identical
>> code for if/else branch
>> 
>> Signed-off-by: Anoop C S <achiraya at redhat.com> --- 
>> source3/registry/reg_perfcount.c | 12 ++---------- 1 file
>> changed, 2 insertions(+), 10 deletions(-)
>> 
>> diff --git a/source3/registry/reg_perfcount.c
>> b/source3/registry/reg_perfcount.c index f78ab44..57ce307 100644 
>> --- a/source3/registry/reg_perfcount.c +++
>> b/source3/registry/reg_perfcount.c @@ -1145,16 +1145,8 @@ static
>> uint32 reg_perfcount_get_perf_data_block(uint32 base_index,
>> 
>> reg_perfcount_get_last_counter(base_index);
>> 
>> -	if(object_ids == NULL) -	{ -		/* we're getting a request for
>> "Global" here */ -		retval =
>> _reg_perfcount_assemble_global(block, mem_ctx, base_index,
>> names); -	} -	else -	{ -		/* we're getting a request for a
>> specific set of PERF_OBJECT_TYPES */ -		retval =
>> _reg_perfcount_assemble_global(block, mem_ctx, base_index,
>> names); -	} +	retval = _reg_perfcount_assemble_global(block,
>> mem_ctx, base_index, names); + buffer_size =
>> _reg_perfcount_perf_data_block_fixup(block, mem_ctx);
>> 
>> tdb_close(names); -- 2.1.0
>> 
> 


- -- 
Günther Deschner                    GPG-ID: 8EE11688
Red Hat                         gdeschner at redhat.com
Samba Team                              gd at samba.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlUUCDwACgkQSOk3aI7hFoiJ3QCgivCAA9a0KIk/095fWToZ9ikv
qs8AoJzuq3GYYdZ5kl6m8TGmCpqzNTcw
=6XDq
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list