mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 15:08:35 +00:00
refactor: replace '\0' with NUL
This commit is contained in:

committed by
Lewis Russell

parent
2f5b8a0092
commit
a18982cb83
@@ -2419,7 +2419,7 @@ char *modname(const char *fname, const char *ext, bool prepend_dot)
|
||||
|
||||
// the file name has at most BASENAMELEN characters.
|
||||
if (strlen(ptr) > BASENAMELEN) {
|
||||
ptr[BASENAMELEN] = '\0';
|
||||
ptr[BASENAMELEN] = NUL;
|
||||
}
|
||||
|
||||
char *s = ptr + strlen(ptr);
|
||||
@@ -3330,7 +3330,7 @@ static void vim_mktempdir(void)
|
||||
#endif
|
||||
// If our "root" tempdir is invalid or fails, proceed without "<user>/".
|
||||
// Else user1 could break user2 by creating "/tmp/nvim.user2/".
|
||||
tmp[strlen(tmp) - strlen(user)] = '\0';
|
||||
tmp[strlen(tmp) - strlen(user)] = NUL;
|
||||
}
|
||||
|
||||
// Now try to create "/tmp/nvim.<user>/XXXXXX".
|
||||
|
Reference in New Issue
Block a user