From 1cfb14aa972ccf3235ac67f07b7db1175b7c5384 Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Mon, 9 Jan 2023 19:04:23 +0000 Subject: patch 9.0.1166: 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 #11792) --- src/diff.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/diff.c') diff --git a/src/diff.c b/src/diff.c index 41cfefe5e6..ec8c8f175d 100644 --- a/src/diff.c +++ b/src/diff.c @@ -559,14 +559,14 @@ diff_alloc_new(tabpage_T *tp, diff_T *dprev, diff_T *dp) diff_T *dnew; dnew = ALLOC_ONE(diff_T); - if (dnew != NULL) - { - dnew->df_next = dp; - if (dprev == NULL) - tp->tp_first_diff = dnew; - else - dprev->df_next = dnew; - } + if (dnew == NULL) + return NULL; + + dnew->df_next = dp; + if (dprev == NULL) + tp->tp_first_diff = dnew; + else + dprev->df_next = dnew; return dnew; } -- cgit v1.2.3