summaryrefslogtreecommitdiff
path: root/src/unistd/getlogin_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unistd/getlogin_r.c')
-rw-r--r--src/unistd/getlogin_r.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/unistd/getlogin_r.c b/src/unistd/getlogin_r.c
index f04f71e5..37ce0d43 100644
--- a/src/unistd/getlogin_r.c
+++ b/src/unistd/getlogin_r.c
@@ -7,7 +7,7 @@ int getlogin_r(char *name, size_t size)
{
char *logname = getlogin();
if (!logname) return ENXIO; /* or...? */
- if (strlen(name) >= size) return ERANGE;
+ if (strlen(logname) >= size) return ERANGE;
strcpy(name, logname);
return 0;
}