From: Volker Lendecke Date: Fri, 22 Nov 2019 10:56:55 +0000 (+0100) Subject: g_lock: Move a variable inside the block were it's used X-Git-Tag: ldb-2.1.0~609 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba852a3d92fd762e0a4d4e1b3a8177a30b5e34d5;p=thirdparty%2Fsamba.git g_lock: Move a variable inside the block were it's used Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c index ae7a478d148..208c7efc531 100644 --- a/source3/lib/g_lock.c +++ b/source3/lib/g_lock.c @@ -325,7 +325,6 @@ static NTSTATUS g_lock_trylock( struct g_lock lck = { .exclusive.pid = 0 }; struct server_id_buf tmp; NTSTATUS status; - bool exists; bool ok; ok = g_lock_parse(data.dptr, data.dsize, &lck); @@ -345,7 +344,7 @@ static NTSTATUS g_lock_trylock( bool self_exclusive = server_id_equal(&self, &lck.exclusive); if (!self_exclusive) { - exists = serverid_exists(&lck.exclusive); + bool exists = serverid_exists(&lck.exclusive); if (!exists) { lck.exclusive = (struct server_id) { .pid=0 }; goto noexclusive;