torture: Correctly initialize array size
authorVolker Lendecke <vl@samba.org>
Sun, 7 Sep 2014 19:09:32 +0000 (21:09 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 8 Sep 2014 14:41:51 +0000 (16:41 +0200)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10800
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Sep  8 16:41:51 CEST 2014 on sn-devel-104

source4/torture/smb2/dir.c

index 0e409f2b70af44201beedb65e3c4808285c0e348..cf96fee15774f67d4ade75eca154cb87ebcfc612 100644 (file)
@@ -895,7 +895,6 @@ static bool check_result(struct torture_context *tctx,
 static bool test_modify_search(struct torture_context *tctx,
                               struct smb2_tree *tree)
 {
-       int num_files = 700;
        struct multiple_result result;
        union smb_setfileinfo sfinfo;
        TALLOC_CTX *mem_ctx = talloc_new(tctx);
@@ -903,7 +902,8 @@ static bool test_modify_search(struct torture_context *tctx,
        struct smb2_handle h;
        struct smb2_find f;
        union smb_search_data *d;
-       struct file_elem files[702] = {};
+       struct file_elem files[703] = {};
+       int num_files = ARRAY_SIZE(files)-3;
        NTSTATUS status;
        bool ret = true;
        int i;