smbd: Use a struct initializer brl_lock
authorVolker Lendecke <vl@samba.org>
Fri, 11 Jul 2014 10:41:54 +0000 (12:41 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 22 Jul 2014 13:32:39 +0000 (15:32 +0200)
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>
source3/locking/brlock.c

index b6b8d9ab2cc6de4a5935216573af30937b303bd9..51a0fd93578fdbb3135acf3faf758926aba83973 100644 (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,