From: Volker Lendecke Date: Mon, 10 Sep 2018 13:14:00 +0000 (+0200) Subject: smbd: Simplify parse_share_modes X-Git-Tag: tdb-1.3.17~1621 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50adbbe0c841360f6d29f66dcdffdaa872c7780d;p=thirdparty%2Fsamba.git smbd: Simplify parse_share_modes Since 823bc4c07ad pidl initializes the [skip] entries Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index 2850e502bda..919e74c0851 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -297,7 +297,6 @@ static struct share_mode_data *parse_share_modes(TALLOC_CTX *mem_ctx, { struct share_mode_data *d; enum ndr_err_code ndr_err; - uint32_t i; DATA_BLOB blob; blob.data = dbuf.dptr; @@ -323,17 +322,6 @@ static struct share_mode_data *parse_share_modes(TALLOC_CTX *mem_ctx, goto fail; } - /* - * Initialize the values that are [skip] or [ignore] - * in the idl. The NDR code does not initialize them. - */ - - for (i=0; inum_share_modes; i++) { - d->share_modes[i].stale = false; - } - d->modified = false; - d->fresh = false; - if (DEBUGLEVEL >= 10) { DEBUG(10, ("parse_share_modes:\n")); NDR_PRINT_DEBUG(share_mode_data, d); @@ -786,7 +774,6 @@ static int share_mode_traverse_fn(struct db_record *rec, void *_state) { struct share_mode_forall_state *state = (struct share_mode_forall_state *)_state; - uint32_t i; TDB_DATA key; TDB_DATA value; DATA_BLOB blob; @@ -819,10 +806,6 @@ static int share_mode_traverse_fn(struct db_record *rec, void *_state) return 0; } - for (i=0; inum_share_modes; i++) { - d->share_modes[i].stale = false; - } - if (DEBUGLEVEL > 10) { DEBUG(11, ("parse_share_modes:\n")); NDR_PRINT_DEBUG(share_mode_data, d);