[PATCHES] dbwrap_ctdb: Small cleanup

Stefan Metzmacher metze at samba.org
Wed Nov 18 09:20:52 UTC 2015


Hi Christof,

> diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c
> index 93df7ef..2bc86d2 100644
> --- a/source3/lib/dbwrap/dbwrap_ctdb.c
> +++ b/source3/lib/dbwrap/dbwrap_ctdb.c
> @@ -557,9 +557,7 @@ static NTSTATUS db_ctdb_transaction_store(struct db_ctdb_transaction_handle *h,
>  {
>  	TALLOC_CTX *tmp_ctx = talloc_new(h);
>  	TDB_DATA rec;
> -	struct ctdb_ltdb_header header;
> -
> -	ZERO_STRUCT(header);
> +	struct ctdb_ltdb_header header = { 0 };
>  
>  	/* we need the header so we can update the RSN */

We can't change this because it doesn't initialize possible
padding within the structure and we later memcpy it into
the stored record.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20151118/aa8ff91d/signature.sig>


More information about the samba-technical mailing list