aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
authorii14 <59243201+ii14@users.noreply.github.com>2023-04-06 22:39:50 +0200
committerGitHub <noreply@github.com>2023-04-06 22:39:50 +0200
commit7190dba017e3aac0409c73ff1c954d18858cb3c9 (patch)
tree321f4b2dd65e4a06047beee876d3c2e0d2dbf7d0 /src/nvim/fileio.c
parent0bc323850410df4c3c1dd8fabded9d2000189270 (diff)
downloadrneovim-7190dba017e3aac0409c73ff1c954d18858cb3c9.tar.gz
rneovim-7190dba017e3aac0409c73ff1c954d18858cb3c9.tar.bz2
rneovim-7190dba017e3aac0409c73ff1c954d18858cb3c9.zip
refactor: remove use of reserved c++ keywords
libnvim couldn't be easily used in C++ due to the use of reserved keywords. Additionally, add explicit casts to *alloc function calls used in inline functions, as C++ doesn't allow implicit casts from void pointers.
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index cbb378b4b6..d76b22f65c 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -5428,10 +5428,9 @@ char *vim_tempname(void)
// There is no need to check if the file exists, because we own the directory
// and nobody else creates a file in it.
- char template[TEMP_FILE_PATH_MAXLEN];
- snprintf(template, TEMP_FILE_PATH_MAXLEN,
- "%s%" PRIu64, tempdir, temp_count++);
- return xstrdup(template);
+ char templ[TEMP_FILE_PATH_MAXLEN];
+ snprintf(templ, TEMP_FILE_PATH_MAXLEN, "%s%" PRIu64, tempdir, temp_count++);
+ return xstrdup(templ);
}
/// Tries matching a filename with a "pattern" ("prog" is NULL), or use the