aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/deprecated.c
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-03-12 17:54:31 +0100
committerDundar Göc <gocdundar@gmail.com>2022-03-13 20:44:53 +0100
commit198bf3a8f2897d679a297fd04e3183dbac8bd61e (patch)
treedf2a29575f25c6c8e85d0a96b8a257548107200b /src/nvim/api/deprecated.c
parent4ba12b3dda34472c193c9fa8ffd7d3bd5b6c04d6 (diff)
downloadrneovim-198bf3a8f2897d679a297fd04e3183dbac8bd61e.tar.gz
rneovim-198bf3a8f2897d679a297fd04e3183dbac8bd61e.tar.bz2
rneovim-198bf3a8f2897d679a297fd04e3183dbac8bd61e.zip
refactor: minimize variable scope and eliminate empty declarations
Diffstat (limited to 'src/nvim/api/deprecated.c')
-rw-r--r--src/nvim/api/deprecated.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/api/deprecated.c b/src/nvim/api/deprecated.c
index d2013c597c..6a41df0aa9 100644
--- a/src/nvim/api/deprecated.c
+++ b/src/nvim/api/deprecated.c
@@ -51,11 +51,10 @@ Integer nvim_buf_get_number(Buffer buffer, Error *err)
FUNC_API_SINCE(1)
FUNC_API_DEPRECATED_SINCE(2)
{
- Integer rv = 0;
buf_T *buf = find_buffer_by_handle(buffer, err);
if (!buf) {
- return rv;
+ return 0;
}
return buf->b_fnum;