]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs: Align a few integer types
authorVolker Lendecke <vl@samba.org>
Fri, 24 Jan 2025 15:04:16 +0000 (16:04 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 5 Feb 2025 00:07:30 +0000 (00:07 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/test_nfs4_acls.c
source3/modules/vfs_snapper.c

index f47ff9b6c1eaa387bad216e469b43905a3920a34..15b179af7582196c4d41990b2513c8ce50147f25 100644 (file)
@@ -42,7 +42,7 @@ struct test_sids {
 static int group_setup(void **state)
 {
        struct dom_sid *sids = NULL;
-       int i;
+       size_t i;
 
        sids = talloc_array(NULL, struct dom_sid, ARRAY_SIZE(test_sids));
        assert_non_null(sids);
@@ -61,7 +61,7 @@ static int group_setup(void **state)
 static int group_teardown(void **state)
 {
        struct dom_sid *sids = *state;
-       int i;
+       size_t i;
 
        for (i = 0; i < ARRAY_SIZE(test_sids); i++) {
                assert_true(idmap_cache_del_sid(&sids[i]));
@@ -80,7 +80,7 @@ static int group_teardown(void **state)
 static void test_cached_id_mappings(void **state)
 {
        struct dom_sid *sids = *state;
-       int i;
+       size_t i;
 
        for (i = 0; i < ARRAY_SIZE(test_sids); i++) {
                struct dom_sid *sid = &sids[i];
@@ -175,7 +175,7 @@ static void test_acl_type_nfs4_to_dacl(void **state)
 {
        struct dom_sid *sids = *state;
        TALLOC_CTX *frame = talloc_stackframe();
-       int i;
+       size_t i;
 
        for (i = 0; i < ARRAY_SIZE(ace_dacl_type_mapping); i++) {
                struct SMB4ACL_T *nfs4_acl;
@@ -222,7 +222,7 @@ static void test_acl_type_dacl_to_nfs4(void **state)
 {
        struct dom_sid *sids = *state;
        TALLOC_CTX *frame = talloc_stackframe();
-       int i;
+       size_t i;
 
        for (i = 0; i < ARRAY_SIZE(ace_dacl_type_mapping); i++) {
                struct SMB4ACL_T *nfs4_acl;
@@ -308,7 +308,7 @@ static void test_ace_flags_nfs4_to_dacl(void **state)
        struct dom_sid *sids = *state;
        TALLOC_CTX *frame = talloc_stackframe();
        SMB_ACE4PROP_T nfs4_ace;
-       int i;
+       size_t i;
 
        for (i = 0; i < ARRAY_SIZE(ace_flags_nfs4_to_dacl); i++) {
                struct SMB4ACL_T *nfs4_acl;
@@ -393,7 +393,7 @@ static void test_ace_flags_dacl_to_nfs4(void **state)
 {
        struct dom_sid *sids = *state;
        TALLOC_CTX *frame = talloc_stackframe();
-       int i;
+       size_t i;
 
        for (i = 0; i < ARRAY_SIZE(ace_flags_dacl_to_nfs4); i++) {
                struct SMB4ACL_T *nfs4_acl;
@@ -472,7 +472,7 @@ static void test_nfs4_permissions_to_dacl(void **state)
 {
        struct dom_sid *sids = *state;
        TALLOC_CTX *frame = talloc_stackframe();
-       int i;
+       size_t i;
 
        for (i = 0; i < ARRAY_SIZE(perm_table_nfs4_to_dacl); i++) {
                struct SMB4ACL_T *nfs4_acl;
@@ -576,7 +576,7 @@ static void test_dacl_permissions_to_nfs4(void **state)
 {
        struct dom_sid *sids = *state;
        TALLOC_CTX *frame = talloc_stackframe();
-       int i;
+       size_t i;
 
        for (i = 0; i < ARRAY_SIZE(perm_table_nfs4_to_dacl); i++) {
                struct SMB4ACL_T *nfs4_acl;
@@ -902,7 +902,7 @@ struct creator_ace_flags {
 static void test_dacl_creator_to_nfs4(void **state)
 {
        TALLOC_CTX *frame = talloc_stackframe();
-       int i;
+       size_t i;
 
        for (i = 0; i < ARRAY_SIZE(creator_ace_flags); i++) {
                struct SMB4ACL_T *nfs4_acl;
@@ -1004,7 +1004,7 @@ static void test_nfs4_to_dacl_creator(void **state)
 {
        struct dom_sid *sids = *state;
        TALLOC_CTX *frame = talloc_stackframe();
-       int i;
+       size_t i;
 
        for (i = 0; i < ARRAY_SIZE(creator_owner_nfs4_to_dacl); i++) {
                struct SMB4ACL_T *nfs4_acl;
@@ -1109,7 +1109,7 @@ static void test_full_control_nfs4_to_dacl(void **state)
 {
        struct dom_sid *sids = *state;
        TALLOC_CTX *frame = talloc_stackframe();
-       int i;
+       size_t i;
 
        for (i = 0; i < ARRAY_SIZE(nfs4_to_dacl_full_control); i++) {
                struct SMB4ACL_T *nfs4_acl;
@@ -1188,7 +1188,7 @@ static void test_dacl_to_nfs4_acedup_settings(void **state)
 {
        struct dom_sid *sids = *state;
        TALLOC_CTX *frame = talloc_stackframe();
-       int i;
+       size_t i;
 
        for (i = 0; i < ARRAY_SIZE(acedup_settings); i++) {
                struct SMB4ACL_T *nfs4_acl;
@@ -1345,7 +1345,7 @@ static void test_dacl_to_nfs4_acedup_match(void **state)
 {
        struct dom_sid *sids = *state;
        TALLOC_CTX *frame = talloc_stackframe();
-       int i;
+       size_t i;
 
        for (i = 0; i < ARRAY_SIZE(acedup_match); i++) {
                struct SMB4ACL_T *nfs4_acl;
@@ -1609,7 +1609,7 @@ static void test_nfs4_to_dacl_idmap_type_both(void **state)
 {
        struct dom_sid *sids = *state;
        TALLOC_CTX *frame = talloc_stackframe();
-       int i;
+       size_t i;
        struct nfs_to_dacl_idmap_both nfs_to_dacl_idmap_both[] = {
                { 0,                            1002, &sids[2] },
                { SMB_ACE4_IDENTIFIER_GROUP,    1002, &sids[2] },
@@ -1681,7 +1681,7 @@ static void test_dacl_to_nfs4_idmap_type_both(void **state)
 {
        struct dom_sid *sids = *state;
        TALLOC_CTX *frame = talloc_stackframe();
-       int i;
+       size_t i;
 
        struct dacl_to_nfs4_idmap_both dacl_to_nfs4_idmap_both[] = {
        { &sids[2], 0,
index 566d574f0bea3e18bb94100f3ee627f09c1af28b..1a3f98bc2462603ac9a045cae5581a9b53c18792 100644 (file)
@@ -78,7 +78,7 @@ static const struct {
 
 static NTSTATUS snapper_err_ntstatus_map(const char *snapper_err_str)
 {
-       int i;
+       size_t i;
 
        if (snapper_err_str == NULL) {
                return NT_STATUS_UNSUCCESSFUL;
@@ -103,7 +103,7 @@ static NTSTATUS snapper_dbus_str_encode(TALLOC_CTX *mem_ctx, const char *in_str,
 {
        size_t in_len;
        char *out_str;
-       int i;
+       size_t i;
        int out_off;
        int out_len;
 
@@ -155,7 +155,7 @@ static NTSTATUS snapper_dbus_str_decode(TALLOC_CTX *mem_ctx, const char *in_str,
 {
        size_t in_len;
        char *out_str;
-       int i;
+       size_t i;
        int out_off;
        int out_len;
 
@@ -367,7 +367,7 @@ static NTSTATUS snapper_dict_unpack(TALLOC_CTX *mem_ctx,
 static void snapper_dict_array_print(uint32_t num_dicts,
                                     struct snapper_dict *dicts)
 {
-       int i;
+       size_t i;
 
        for (i = 0; i < num_dicts; i++) {
                DEBUG(10, ("dict (key: %s, val: %s)\n",