diff src/findfile.c @ 31651:e5ee2ffd826a v9.0.1158

patch 9.0.1158: code is indented more than necessary Commit: https://github.com/vim/vim/commit/7f8b2559a30e2e2a443c35b28e94c6b45ba7ae04 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sun Jan 8 13:44:24 2023 +0000 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)
author Bram Moolenaar <Bram@vim.org>
date Sun, 08 Jan 2023 14:45:05 +0100
parents 37aa9fd2ed72
children b89cfd86e18e
line wrap: on
line diff
--- a/src/findfile.c
+++ b/src/findfile.c
@@ -1426,11 +1426,11 @@ ff_push(ff_search_ctx_T *search_ctx, ff_
 {
     // 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;
 }
 
 /*