mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 06:18:16 +00:00
Linting: Suppress warnings in os/users.c.
This commit is contained in:

committed by
Justin M. Keyes

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)
|
#if defined(HAVE_PWD_H) && defined(HAVE_GETPWUID)
|
||||||
struct passwd *pw;
|
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) {
|
&& pw->pw_name != NULL && *(pw->pw_name) != NUL) {
|
||||||
STRLCPY(s, pw->pw_name, len);
|
STRLCPY(s, pw->pw_name, len);
|
||||||
return OK;
|
return OK;
|
||||||
@@ -72,7 +72,7 @@ char *os_get_user_directory(const char *name)
|
|||||||
if (name == NULL) {
|
if (name == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
pw = getpwnam(name);
|
pw = getpwnam(name); // NOLINT(runtime/threadsafe_fn)
|
||||||
if (pw != NULL) {
|
if (pw != NULL) {
|
||||||
// save the string from the static passwd entry into malloced memory
|
// save the string from the static passwd entry into malloced memory
|
||||||
return xstrdup(pw->pw_dir);
|
return xstrdup(pw->pw_dir);
|
||||||
|
Reference in New Issue
Block a user