s4:getncchanges.c - fix some counter variable types
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Mon, 23 Aug 2010 05:37:36 +0000 (07:37 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Mon, 23 Aug 2010 16:05:52 +0000 (18:05 +0200)
They should be "unsigned" since they count LDB objects. And also the SID array
can be counted as "unsigned".

source4/rpc_server/drsuapi/getncchanges.c

index 7eb5ee0d98e941142ab46eef335dc8f1a0218a22..262559592da62646680d0ff65ca4d576d4998b79 100644 (file)
@@ -690,7 +690,7 @@ static WERROR samdb_result_sid_array_dn(struct ldb_context *sam_ctx,
                                        const struct dom_sid ***sids)
 {
        struct ldb_message_element *el;
-       int i;
+       unsigned int i;
 
        el = ldb_msg_find_element(msg, attr);
        if (!el) {
@@ -731,7 +731,7 @@ static WERROR samdb_result_sid_array_ndr(struct ldb_context *sam_ctx,
                                         const struct dom_sid ***sids)
 {
        struct ldb_message_element *el;
-       int i;
+       unsigned int i;
 
        el = ldb_msg_find_element(msg, attr);
        if (!el) {
@@ -766,7 +766,7 @@ static WERROR samdb_result_sid_array_ndr(struct ldb_context *sam_ctx,
  */
 static bool sid_list_match(const struct dom_sid **list1, const struct dom_sid **list2)
 {
-       int i, j;
+       unsigned int i, j;
        /* do we ever have enough SIDs here to worry about O(n^2) ? */
        for (i=0; list1[i]; i++) {
                for (j=0; list2[j]; j++) {