s4:samdb.c - Make it signed-safe
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 6 Nov 2009 19:14:41 +0000 (20:14 +0100)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Wed, 3 Mar 2010 19:15:25 +0000 (20:15 +0100)
Use an unsigned argument for the numbers of groups and the counter "i" since
the function is called only by "auth_generate_session_info" with an unsigned
number of groups argument.

source4/dsdb/samdb/samdb.c

index 2232e436d23375071958cca987fc155ba13612fc..51e3f73a7e9c1d5e2a9871c786803394a283dda0 100644 (file)
@@ -144,13 +144,13 @@ NTSTATUS security_token_create(TALLOC_CTX *mem_ctx,
                               struct loadparm_context *lp_ctx,
                               struct dom_sid *user_sid,
                               struct dom_sid *group_sid, 
-                              int n_groupSIDs,
+                              unsigned int n_groupSIDs,
                               struct dom_sid **groupSIDs, 
                               bool is_authenticated,
                               struct security_token **token)
 {
        struct security_token *ptoken;
-       int i;
+       unsigned int i;
        NTSTATUS status;
 
        ptoken = security_token_initialise(mem_ctx);