From: Ralph Boehme Date: Tue, 31 Oct 2023 05:05:25 +0000 (+0100) Subject: smbtorture3: reduce indentation in posix_ls_fn() X-Git-Tag: talloc-2.4.2~846 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c91f8ac2a9943f4b58090faf8cb3dcdb2a19e5a;p=thirdparty%2Fsamba.git smbtorture3: reduce indentation in posix_ls_fn() Prepares for adding more logic in a later commit. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/torture/test_posix.c b/source3/torture/test_posix.c index dbf72db7b03..847f2046117 100644 --- a/source3/torture/test_posix.c +++ b/source3/torture/test_posix.c @@ -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;