summaryrefslogtreecommitdiff
path: root/src/common/username.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/username.c')
-rw-r--r--src/common/username.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/username.c b/src/common/username.c
index c6812ddd9d1..e946972a561 100644
--- a/src/common/username.c
+++ b/src/common/username.c
@@ -34,17 +34,17 @@ get_user_name(char **errstr)
{
#ifndef WIN32
struct passwd *pw;
- uid_t user_id = geteuid();
+ uid_t user_id = geteuid();
*errstr = NULL;
- errno = 0; /* clear errno before call */
+ errno = 0; /* clear errno before call */
pw = getpwuid(user_id);
if (!pw)
{
- *errstr = psprintf(_("failed to look up effective user id %d: %s"),
- (int) user_id, errno ? strerror(errno) :
- _("user does not exist"));
+ *errstr = psprintf(_("failed to look up effective user id %ld: %s"),
+ (long) user_id,
+ errno ? strerror(errno) : _("user does not exist"));
return NULL;
}