patch 9.0.1158: code is indented more than necessary
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes #11787)
diff --git a/src/findfile.c b/src/findfile.c
index 9ce733c..017e1c6 100644
--- a/src/findfile.c
+++ b/src/findfile.c
@@ -1426,11 +1426,11 @@
{
// check for NULL pointer, not to return an error to the user, but
// to prevent a crash
- if (stack_ptr != NULL)
- {
- stack_ptr->ffs_prev = search_ctx->ffsc_stack_ptr;
- search_ctx->ffsc_stack_ptr = stack_ptr;
- }
+ if (stack_ptr == NULL)
+ return;
+
+ stack_ptr->ffs_prev = search_ctx->ffsc_stack_ptr;
+ search_ctx->ffsc_stack_ptr = stack_ptr;
}
/*