aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/debugger.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/debugger.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/debugger.c')
-rw-r--r--src/nvim/debugger.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/debugger.c b/src/nvim/debugger.c
index bfb15d59f5..9ab95eaec6 100644
--- a/src/nvim/debugger.c
+++ b/src/nvim/debugger.c
@@ -505,7 +505,6 @@ static typval_T *eval_expr_no_emsg(struct debuggy *const bp)
static int dbg_parsearg(char *arg, garray_T *gap)
{
char *p = arg;
- char *q;
bool here = false;
ga_grow(gap, 1);
@@ -561,7 +560,7 @@ static int dbg_parsearg(char *arg, garray_T *gap)
// Expand the file name in the same way as do_source(). This means
// doing it twice, so that $DIR/file gets expanded when $DIR is
// "~/dir".
- q = expand_env_save(p);
+ char *q = expand_env_save(p);
if (q == NULL) {
return FAIL;
}