errno is an integer, not a pointer.
This commit is contained in:
2
cui.cpp
2
cui.cpp
@@ -91,7 +91,7 @@ std::string itoa(int i)
|
|||||||
std::string uid2username (uid_t uid)
|
std::string uid2username (uid_t uid)
|
||||||
{
|
{
|
||||||
struct passwd * pwd = NULL;
|
struct passwd * pwd = NULL;
|
||||||
errno = NULL;
|
errno = 0;
|
||||||
|
|
||||||
/* points to a static memory area, should not be freed */
|
/* points to a static memory area, should not be freed */
|
||||||
pwd = getpwuid(uid);
|
pwd = getpwuid(uid);
|
||||||
|
|||||||
Reference in New Issue
Block a user