diff options
author | Jeremy Allison <jra@samba.org> | 2012-12-20 11:51:55 -0800 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2013-01-09 15:28:28 +1100 |
commit | 390a812ccb9ba5dbc67296cc27e7aa56e6dd5ab3 (patch) | |
tree | d3fb3079b8b70a436e0d8e36531a9ae0f43b76dd /source3 | |
parent | 310c4cac907877958f771c4933329560655f814c (diff) | |
download | samba-390a812ccb9ba5dbc67296cc27e7aa56e6dd5ab3.tar.gz samba-390a812ccb9ba5dbc67296cc27e7aa56e6dd5ab3.tar.bz2 samba-390a812ccb9ba5dbc67296cc27e7aa56e6dd5ab3.zip |
Move the definition of struct vuid_cache_entry *ent outside blocks.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/uid.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 2aa9fff34b..9361e490a3 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -93,10 +93,9 @@ static bool check_user_ok(connection_struct *conn, unsigned int i; bool readonly_share; bool admin_user; + struct vuid_cache_entry *ent = NULL; { - struct vuid_cache_entry *ent; - for (i=0; i<VUID_CACHE_SIZE; i++) { ent = &conn->vuid_cache.array[i]; if (ent->vuid == vuid) { @@ -145,8 +144,7 @@ static bool check_user_ok(connection_struct *conn, NULL, session_info->security_token, lp_admin_users(snum)); { - struct vuid_cache_entry *ent = - &conn->vuid_cache.array[conn->vuid_cache.next_entry]; + ent = &conn->vuid_cache.array[conn->vuid_cache.next_entry]; conn->vuid_cache.next_entry = (conn->vuid_cache.next_entry + 1) % VUID_CACHE_SIZE; |