]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
torture4: Align a few integer types
authorVolker Lendecke <vl@samba.org>
Sat, 28 Dec 2024 11:08:21 +0000 (12:08 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 23 Jan 2025 23:08:38 +0000 (23:08 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/torture/raw/search.c
source4/torture/rpc/samba3rpc.c

index edca38d676623d0b3f7bd4daa5b2d9b1e3b9f8f8..58f1fa090d9e31eb5783f4929f0e3be91857c3ce 100644 (file)
@@ -242,7 +242,7 @@ static struct {
 static const char *level_name(enum smb_search_level level,
                              enum smb_search_data_level data_level)
 {
-       int i;
+       size_t i;
        for (i=0;i<ARRAY_SIZE(levels);i++) {
                if (level == levels[i].level &&
                    data_level == levels[i].data_level) {
@@ -258,7 +258,7 @@ static const char *level_name(enum smb_search_level level,
 static const char *extract_name(void *data, enum smb_search_level level,
                                enum smb_search_data_level data_level)
 {
-       int i;
+       size_t i;
        for (i=0;i<ARRAY_SIZE(levels);i++) {
                if (level == levels[i].level &&
                    data_level == levels[i].data_level) {
@@ -274,7 +274,7 @@ static const char *extract_name(void *data, enum smb_search_level level,
 static uint32_t extract_resume_key(void *data, enum smb_search_level level,
                                   enum smb_search_data_level data_level)
 {
-       int i;
+       size_t i;
        for (i=0;i<ARRAY_SIZE(levels);i++) {
                if (level == levels[i].level &&
                    data_level == levels[i].data_level) {
@@ -287,7 +287,7 @@ static uint32_t extract_resume_key(void *data, enum smb_search_level level,
 /* find a level in the table by name */
 static union smb_search_data *find(const char *name)
 {
-       int i;
+       size_t i;
        for (i=0;i<ARRAY_SIZE(levels);i++) {
                if (NT_STATUS_IS_OK(levels[i].status) &&
                    strcmp(levels[i].name, name) == 0) {
@@ -358,7 +358,7 @@ static bool test_one_file(struct torture_context *tctx,
        const char *fname = "torture_search.txt";
        const char *fname2 = "torture_search-NOTEXIST.txt";
        NTSTATUS status;
-       int i;
+       size_t i;
        union smb_fileinfo all_info, alt_info, name_info, internal_info;
        bool all_info_supported, alt_info_supported, name_info_supported,
            internal_info_supported;
@@ -836,7 +836,8 @@ static bool test_many_files(struct torture_context *tctx,
                            struct smbcli_state *cli)
 {
        const int num_files = 700;
-       int i, fnum, t;
+       int i, fnum;
+       size_t t;
        char *fname;
        bool ret = true;
        NTSTATUS status;
index 811a0ceb986af9f37c1e3a3d315985415015b1b7..84561de7b99f3e487bfebcadf51c7d32a46c2870 100644 (file)
@@ -1931,7 +1931,7 @@ static bool test_NetShareGetInfo(struct torture_context *tctx,
        struct srvsvc_NetShareGetInfo r;
        union srvsvc_NetShareInfo info;
        uint32_t levels[] = { 0, 1, 2, 501, 502, 1004, 1005, 1006, 1007, 1501 };
-       int i;
+       size_t i;
        bool ret = true;
        struct dcerpc_binding_handle *b = p->binding_handle;
 
@@ -1984,7 +1984,7 @@ static bool test_NetShareEnum(struct torture_context *tctx,
        struct srvsvc_NetShareCtr1007 c1007;
        uint32_t totalentries = 0;
        uint32_t levels[] = { 0, 1, 2, 501, 502, 1004, 1005, 1006, 1007 };
-       int i;
+       size_t i;
        bool ret = true;
        struct dcerpc_binding_handle *b = p->binding_handle;
 
@@ -2582,7 +2582,7 @@ static bool torture_samba3_rpc_lsa(struct torture_context *torture)
        }
 
        {
-               int i;
+               size_t i;
                int levels[] = { 2,3,5,6 };
 
                for (i=0; i<ARRAY_SIZE(levels); i++) {
@@ -2658,7 +2658,7 @@ static bool find_printers(struct torture_context *tctx,
        struct srvsvc_NetShareCtr1 c1_in;
        struct srvsvc_NetShareCtr1 *c1;
        uint32_t totalentries = 0;
-       int i;
+       uint32_t i;
        struct dcerpc_binding_handle *b = p->binding_handle;
 
        ZERO_STRUCT(c1_in);