From: Stefan Metzmacher Date: Wed, 24 Oct 2012 13:17:56 +0000 (+0200) Subject: s3:smbXsrv_open: initialize smbXsrv_open_global->lock_sequence_array with 0xFF X-Git-Tag: ldb-2.2.0~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5846e4825604bcc1a15798c5da9f86ca44851b0e;p=thirdparty%2Fsamba.git s3:smbXsrv_open: initialize smbXsrv_open_global->lock_sequence_array with 0xFF This is way to mark an entry as invalid (.valid = false). Pair-Programmed-With: Michael Adam Signed-off-by: Stefan Metzmacher Signed-off-by: Michael Adam Reviewed-by: Guenther Deschner Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/smbXsrv_open.c b/source3/smbd/smbXsrv_open.c index b7b08e76c31..5180315449d 100644 --- a/source3/smbd/smbXsrv_open.c +++ b/source3/smbd/smbXsrv_open.c @@ -526,6 +526,13 @@ static NTSTATUS smbXsrv_open_global_allocate(struct db_context *db, } talloc_set_destructor(global, smbXsrv_open_global_destructor); + /* + * We mark every slot as invalid using 0xFF. + * Valid values are masked with 0xF. + */ + memset(global->lock_sequence_array, 0xFF, + sizeof(global->lock_sequence_array)); + /* * Here we just randomly try the whole 32-bit space *