[PATCH] ntdb: Make sure variables passed by value are initialized.

Alexander Bokovoy ab at samba.org
Fri Oct 11 08:10:31 MDT 2013


On Fri, Oct 11, 2013 at 03:40:43PM +0200, Andreas Schneider wrote:
> This fixes a GCC warning.
> 
> Signed-off-by: Andreas Schneider <asn at samba.org>
> ---
>  lib/ntdb/check.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/ntdb/check.c b/lib/ntdb/check.c
> index 2790c68..5b6e905 100644
> --- a/lib/ntdb/check.c
> +++ b/lib/ntdb/check.c
> @@ -659,10 +659,11 @@ _PUBLIC_ enum NTDB_ERROR ntdb_check_(struct ntdb_context *ntdb,
>  			  enum NTDB_ERROR (*check)(NTDB_DATA, NTDB_DATA, void *),
>  			  void *data)
>  {
> -	ntdb_off_t *fr = NULL, *used = NULL, ft, recovery;
> +	ntdb_off_t *fr = NULL, *used = NULL;
> +	ntdb_off_t ft = 0, recovery = 0;
>  	size_t num_free = 0, num_used = 0, num_found = 0, num_ftables = 0,
>  		num_capabilities = 0;
> -	uint64_t features;
> +	uint64_t features = 0;
>  	enum NTDB_ERROR ecode;
>  
>  	if (ntdb->flags & NTDB_CANT_CHECK) {
ACK. Please commit with my Reviewed-by.

-- 
/ Alexander Bokovoy


More information about the samba-technical mailing list