mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Linting: Suppress warnings in os/users.c.
This commit is contained in:
parent
0f258e4453
commit
ed9828140a
@ -52,7 +52,7 @@ int os_get_uname(uid_t uid, char *s, size_t len)
|
||||
#if defined(HAVE_PWD_H) && defined(HAVE_GETPWUID)
|
||||
struct passwd *pw;
|
||||
|
||||
if ((pw = getpwuid(uid)) != NULL
|
||||
if ((pw = getpwuid(uid)) != NULL // NOLINT(runtime/threadsafe_fn)
|
||||
&& pw->pw_name != NULL && *(pw->pw_name) != NUL) {
|
||||
STRLCPY(s, pw->pw_name, len);
|
||||
return OK;
|
||||
@ -72,7 +72,7 @@ char *os_get_user_directory(const char *name)
|
||||
if (name == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
pw = getpwnam(name);
|
||||
pw = getpwnam(name); // NOLINT(runtime/threadsafe_fn)
|
||||
if (pw != NULL) {
|
||||
// save the string from the static passwd entry into malloced memory
|
||||
return xstrdup(pw->pw_dir);
|
||||
|
Loading…
Reference in New Issue
Block a user