Simplify invalidate_all_vuids() slightly
authorVolker Lendecke <vl@samba.org>
Mon, 29 Dec 2008 18:50:39 +0000 (19:50 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 30 Dec 2008 10:26:10 +0000 (11:26 +0100)
invalidate_vuid takes care of removing the user_struct from validated_users

source3/smbd/password.c

index 84b40f28cc61738ae90b6bd7abce4c9cd5fbcae0..11b19d373eb5192c58e38f3fe3898d9aa33ec296 100644 (file)
@@ -139,11 +139,8 @@ void invalidate_vuid(uint16 vuid)
 
 void invalidate_all_vuids(void)
 {
-       user_struct *usp, *next=NULL;
-
-       for (usp=validated_users;usp;usp=next) {
-               next = usp->next;
-               invalidate_vuid(usp->vuid);
+       while (validated_users != NULL) {
+               invalidate_vuid(validated_users->vuid);
        }
 }