diff options
author | dundargoc <gocdundar@gmail.com> | 2023-11-12 15:54:54 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-13 23:39:56 +0100 |
commit | 28f4f3c48498086307ed825d1761edb5789ca0e8 (patch) | |
tree | 880d2104092261fe0457b17a9ddda8a6e0f7f2ed /src/nvim/os/shell.c | |
parent | 48bcc7b9710d6db619b05254ea87f4087cdd9764 (diff) | |
download | rneovim-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/os/shell.c')
-rw-r--r-- | src/nvim/os/shell.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c index b3ce4a3c91..2fd4c732fc 100644 --- a/src/nvim/os/shell.c +++ b/src/nvim/os/shell.c @@ -1234,12 +1234,12 @@ static size_t word_length(const char *str) /// before we finish writing. static void read_input(DynamicBuffer *buf) { - size_t written = 0, l = 0, len = 0; + size_t written = 0, len = 0; linenr_T lnum = curbuf->b_op_start.lnum; char *lp = ml_get(lnum); while (true) { - l = strlen(lp + written); + size_t l = strlen(lp + written); if (l == 0) { len = 0; } else if (lp[written] == NL) { |