aboutsummaryrefslogtreecommitdiffstats
path: root/shell_cmds/who/utmpentry.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell_cmds/who/utmpentry.c')
-rw-r--r--shell_cmds/who/utmpentry.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell_cmds/who/utmpentry.c b/shell_cmds/who/utmpentry.c
index b0e0914..7938d37 100644
--- a/shell_cmds/who/utmpentry.c
+++ b/shell_cmds/who/utmpentry.c
@@ -319,7 +319,7 @@ getentry(struct utmpentry *e, struct utmp *up)
static void
getentryx(struct utmpentry *e, struct utmpx *up)
{
- COMPILE_ASSERT(sizeof(e->name) > sizeof(up->ut_name));
+ COMPILE_ASSERT(sizeof(e->name) > sizeof(up->ut_user));
COMPILE_ASSERT(sizeof(e->line) > sizeof(up->ut_line));
COMPILE_ASSERT(sizeof(e->host) > sizeof(up->ut_host));
@@ -331,7 +331,7 @@ getentryx(struct utmpentry *e, struct utmpx *up)
* reason we use the size of the _source_ as the length
* argument.
*/
- (void)strncpy(e->name, up->ut_name, sizeof(up->ut_name));
+ (void)strncpy(e->name, up->ut_user, sizeof(up->ut_user));
(void)strncpy(e->line, up->ut_line, sizeof(up->ut_line));
(void)strncpy(e->host, up->ut_host, sizeof(up->ut_host));