aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2014-12-13 10:56:17 -0300
committerFelipe Oliveira Carvalho <felipekde@gmail.com>2014-12-13 23:36:11 -0300
commit0bc40e660c0a74776ace86ad5e393755523c3803 (patch)
tree94fd08577b5eed003b6f7eb3a7bcafcac7f20a66 /src/nvim/buffer.c
parent77135447e09903b45d1482da45869946212f7904 (diff)
downloadrneovim-0bc40e660c0a74776ace86ad5e393755523c3803.tar.gz
rneovim-0bc40e660c0a74776ace86ad5e393755523c3803.tar.bz2
rneovim-0bc40e660c0a74776ace86ad5e393755523c3803.zip
Simple refatorings that didn't fit the pattern of the last commit
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index b8dbb413ba..f84e25cdfb 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -2105,14 +2105,10 @@ void get_winopts(buf_T *buf)
*/
pos_T *buflist_findfpos(buf_T *buf)
{
- wininfo_T *wip;
static pos_T no_position = INIT_POS_T(1, 0, 0);
- wip = find_wininfo(buf, FALSE);
- if (wip != NULL)
- return &(wip->wi_fpos);
- else
- return &no_position;
+ wininfo_T *wip = find_wininfo(buf, FALSE);
+ return (wip == NULL) ? &no_position : &(wip->wi_fpos);
}
/*