smbtorture3: reduce indentation in posix_ls_fn()
authorRalph Boehme <slow@samba.org>
Tue, 31 Oct 2023 05:05:25 +0000 (06:05 +0100)
committerJeremy Allison <jra@samba.org>
Sun, 5 Nov 2023 18:34:38 +0000 (18:34 +0000)
Prepares for adding more logic in a later commit.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/torture/test_posix.c

index dbf72db7b037a6eab64ffa96ebee31d265abb746..847f2046117790e0abc3fcf7251426232e700b8c 100644 (file)
@@ -46,14 +46,15 @@ static NTSTATUS posix_ls_fn(struct file_info *finfo,
                (struct posix_test_entry *)_state;
 
        for (; state->name != NULL; state++) {
-               if (strequal(finfo->name, state->expected)) {
-                       if (state->attr != finfo->attr) {
-                               break;
-                       }
-                       state->ok = true;
-                       state->returned_size = finfo->size;
+               if (!strequal(finfo->name, state->expected)) {
+                       continue;
+               }
+               if (state->attr != finfo->attr) {
                        break;
                }
+               state->ok = true;
+               state->returned_size = finfo->size;
+               break;
        }
 
        return NT_STATUS_OK;