mirror of
https://github.com/neovim/neovim.git
synced 2026-01-06 05:17:43 +00:00
refactor: follow style guide
- reduce variable scope - prefer initialization over declaration and assignment - use bool to represent boolean values
This commit is contained in:
@@ -254,9 +254,8 @@ void alist_slash_adjust(void)
|
||||
static char *do_one_arg(char *str)
|
||||
{
|
||||
char *p;
|
||||
bool inbacktick;
|
||||
|
||||
inbacktick = false;
|
||||
bool inbacktick = false;
|
||||
for (p = str; *str; str++) {
|
||||
// When the backslash is used for escaping the special meaning of a
|
||||
// character we need to keep it until wildcard expansion.
|
||||
@@ -834,10 +833,8 @@ char *get_arglist_name(expand_T *xp FUNC_ATTR_UNUSED, int idx)
|
||||
/// Get the file name for an argument list entry.
|
||||
char *alist_name(aentry_T *aep)
|
||||
{
|
||||
buf_T *bp;
|
||||
|
||||
// Use the name from the associated buffer if it exists.
|
||||
bp = buflist_findnr(aep->ae_fnum);
|
||||
buf_T *bp = buflist_findnr(aep->ae_fnum);
|
||||
if (bp == NULL || bp->b_fname == NULL) {
|
||||
return aep->ae_fname;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user