mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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)
This commit is contained in:
committed by
Bram Moolenaar
parent
765d82a657
commit
1cfb14aa97
16
src/diff.c
16
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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user