diff options
Diffstat (limited to 'src/os')
-rw-r--r-- | src/os/env.c | 2 | ||||
-rw-r--r-- | src/os/fs.c | 2 | ||||
-rw-r--r-- | src/os/shell.c | 8 | ||||
-rw-r--r-- | src/os/users.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/os/env.c b/src/os/env.c index e6cdb92ea8..174f142854 100644 --- a/src/os/env.c +++ b/src/os/env.c @@ -42,7 +42,7 @@ char *os_getenvname_at_index(size_t index) return NULL; } int namesize = 0; - while (str[namesize] != '=' && str[namesize] != NUL) { + while (str[namesize] != '=' && str[namesize] != '\0') { namesize++; } char *name = (char *)vim_strnsave((char_u *)str, namesize); diff --git a/src/os/fs.c b/src/os/fs.c index f9b02375e1..461913433f 100644 --- a/src/os/fs.c +++ b/src/os/fs.c @@ -84,7 +84,7 @@ static bool is_executable_in_path(const char_u *name) { const char *path = getenv("PATH"); // PATH environment variable does not exist or is empty. - if (path == NULL || *path == NUL) { + if (path == NULL || *path == '\0') { return false; } diff --git a/src/os/shell.c b/src/os/shell.c index d14e355d19..7e5f5fd41e 100644 --- a/src/os/shell.c +++ b/src/os/shell.c @@ -251,14 +251,14 @@ static int tokenize(char_u *str, char **argv) int argc = 0, len; char_u *p = str; - while (*p != NUL) { + while (*p != '\0') { len = word_length(p); if (argv != NULL) { // Fill the slot argv[argc] = xmalloc(len + 1); memcpy(argv[argc], p, len); - argv[argc][len] = NUL; + argv[argc][len] = '\0'; } argc++; @@ -323,7 +323,7 @@ static void write_selection(uv_write_t *req) buflen *= 2; pdata->wbuffer = xrealloc(pdata->wbuffer, buflen); } - pdata->wbuffer[off++] = NUL; + pdata->wbuffer[off++] = '\0'; } else { char_u *s = vim_strchr(lp + written, NL); len = s == NULL ? l : s - (lp + written); @@ -405,7 +405,7 @@ static void read_cb(uv_stream_t *stream, ssize_t cnt, const uv_buf_t *buf) if (pdata->rbuffer[i] == NL) { // Insert the line append_ga_line(&pdata->ga); - } else if (pdata->rbuffer[i] == NUL) { + } else if (pdata->rbuffer[i] == '\0') { // Translate NUL to NL ga_append(&pdata->ga, NL); } else { diff --git a/src/os/users.c b/src/os/users.c index e7b362637b..8a52f905be 100644 --- a/src/os/users.c +++ b/src/os/users.c @@ -56,7 +56,7 @@ int os_get_uname(uid_t uid, char *s, size_t len) struct passwd *pw; if ((pw = getpwuid(uid)) != NULL - && pw->pw_name != NULL && *(pw->pw_name) != NUL) { + && pw->pw_name != NULL && *(pw->pw_name) != '\0') { vim_strncpy((char_u *)s, (char_u *)pw->pw_name, len - 1); return OK; } |