aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/runtime.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-11-12 15:54:54 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-11-13 23:39:56 +0100
commit28f4f3c48498086307ed825d1761edb5789ca0e8 (patch)
tree880d2104092261fe0457b17a9ddda8a6e0f7f2ed /src/nvim/runtime.c
parent48bcc7b9710d6db619b05254ea87f4087cdd9764 (diff)
downloadrneovim-28f4f3c48498086307ed825d1761edb5789ca0e8.tar.gz
rneovim-28f4f3c48498086307ed825d1761edb5789ca0e8.tar.bz2
rneovim-28f4f3c48498086307ed825d1761edb5789ca0e8.zip
refactor: follow style guide
- reduce variable scope - prefer initialization over declaration and assignment - use bool to represent boolean values
Diffstat (limited to 'src/nvim/runtime.c')
-rw-r--r--src/nvim/runtime.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nvim/runtime.c b/src/nvim/runtime.c
index 1438385e66..83c4a68af2 100644
--- a/src/nvim/runtime.c
+++ b/src/nvim/runtime.c
@@ -2583,10 +2583,8 @@ char *getsourceline(int c, void *cookie, int indent, bool do_concat)
}
if (line != NULL && sp->conv.vc_type != CONV_NONE) {
- char *s;
-
// Convert the encoding of the script line.
- s = string_convert(&sp->conv, line, NULL);
+ char *s = string_convert(&sp->conv, line, NULL);
if (s != NULL) {
xfree(line);
line = s;