1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

smbd: Use a struct initializer brl_lock

Avoids a #ifdef DEVELOPER and saves a few bytes .text

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Volker Lendecke 2014-07-11 12:41:54 +02:00 committed by Stefan Metzmacher
parent 164e0cb23c
commit 432130c572

View File

@ -964,19 +964,16 @@ NTSTATUS brl_lock(struct messaging_context *msg_ctx,
}
#endif
#ifdef DEVELOPER
/* Quieten valgrind on test. */
ZERO_STRUCT(lock);
#endif
lock.context.smblctx = smblctx;
lock.context.pid = pid;
lock.context.tid = br_lck->fsp->conn->cnum;
lock.start = start;
lock.size = size;
lock.fnum = br_lck->fsp->fnum;
lock.lock_type = lock_type;
lock.lock_flav = lock_flav;
lock = (struct lock_struct) {
.context.smblctx = smblctx,
.context.pid = pid,
.context.tid = br_lck->fsp->conn->cnum,
.start = start,
.size = size,
.fnum = br_lck->fsp->fnum,
.lock_type = lock_type,
.lock_flav = lock_flav
};
if (lock_flav == WINDOWS_LOCK) {
ret = SMB_VFS_BRL_LOCK_WINDOWS(br_lck->fsp->conn, br_lck,