refactor: replace '\0' with NUL

This commit is contained in:
James Tirta Halim
2024-06-03 11:00:20 +07:00
committed by Lewis Russell
parent 2f5b8a0092
commit a18982cb83
23 changed files with 65 additions and 62 deletions

View File

@@ -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".