comparison 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
comparison
equal deleted inserted replaced
31650:0f3310ec8487 31651:e5ee2ffd826a
1424 static void 1424 static void
1425 ff_push(ff_search_ctx_T *search_ctx, ff_stack_T *stack_ptr) 1425 ff_push(ff_search_ctx_T *search_ctx, ff_stack_T *stack_ptr)
1426 { 1426 {
1427 // check for NULL pointer, not to return an error to the user, but 1427 // check for NULL pointer, not to return an error to the user, but
1428 // to prevent a crash 1428 // to prevent a crash
1429 if (stack_ptr != NULL) 1429 if (stack_ptr == NULL)
1430 { 1430 return;
1431 stack_ptr->ffs_prev = search_ctx->ffsc_stack_ptr; 1431
1432 search_ctx->ffsc_stack_ptr = stack_ptr; 1432 stack_ptr->ffs_prev = search_ctx->ffsc_stack_ptr;
1433 } 1433 search_ctx->ffsc_stack_ptr = stack_ptr;
1434 } 1434 }
1435 1435
1436 /* 1436 /*
1437 * Pop a dir from the directory stack. 1437 * Pop a dir from the directory stack.
1438 * Returns NULL if stack is empty. 1438 * Returns NULL if stack is empty.