diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/uid.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index ffa643a8f5..343a0cf490 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -123,9 +123,9 @@ static bool check_user_ok(connection_struct *conn, user_struct *vuser,int snum) return False; } - i = conn->vuid_cache.entries % VUID_CACHE_SIZE; - if (conn->vuid_cache.entries < VUID_CACHE_SIZE) - conn->vuid_cache.entries++; + i = conn->vuid_cache.entries; + conn->vuid_cache.entries = + (conn->vuid_cache.entries + 1) % VUID_CACHE_SIZE; ent = &conn->vuid_cache.array[i]; ent->vuid = vuser->vuid; |