refactor: minimize variable scope and eliminate empty declarations

This commit is contained in:
Dundar Göc
2022-03-12 17:54:31 +01:00
parent 4ba12b3dda
commit 198bf3a8f2
11 changed files with 152 additions and 291 deletions

View File

@@ -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;