s4:cracknames - Change two counter variables to unsigned
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>
Fri, 5 Mar 2010 12:38:00 +0000 (13:38 +0100)
In both cases the unsigned counter fits better:
- in the first one since we are counting LDB objects starting from 0
- in the second since we are counting an array starting from 0

source4/dsdb/samdb/cracknames.c

index 3095ee2d46568d31b34505970ec2fa50b0f6ceb6..9430ce0a984d6acb07778757dac53cddd72ee839 100644 (file)
@@ -80,7 +80,7 @@ static enum drsuapi_DsNameStatus LDB_lookup_spn_alias(krb5_context context, stru
                                                      const char *alias_from,
                                                      char **alias_to)
 {
-       int i;
+       unsigned int i;
        int ret;
        struct ldb_result *res;
        struct ldb_message_element *spnmappings;
@@ -374,7 +374,7 @@ WERROR DsCrackNameOneName(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx,
        switch (format_offered) {
        case DRSUAPI_DS_NAME_FORMAT_UNKNOWN:
        {
-               int i;
+               unsigned int i;
                enum drsuapi_DsNameFormat formats[] = {
                        DRSUAPI_DS_NAME_FORMAT_FQDN_1779, DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL,
                        DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT, DRSUAPI_DS_NAME_FORMAT_CANONICAL,