diff options
author | Cameron Katri <me@cameronkatri.com> | 2021-05-10 11:59:14 -0400 |
---|---|---|
committer | Cameron Katri <me@cameronkatri.com> | 2021-05-10 14:59:06 -0400 |
commit | 0d0ad219a6366e30e1b1ae41f79c8e10a21ade6d (patch) | |
tree | 6c00373b0ec2a5f83ddad990b0ed347675bfa57d /shell_cmds/who/utmpentry.c | |
parent | b9db19b71926ba1d2b0722a43cf538bf139fc0d9 (diff) | |
download | apple_cmds-0d0ad219a6366e30e1b1ae41f79c8e10a21ade6d.tar.gz apple_cmds-0d0ad219a6366e30e1b1ae41f79c8e10a21ade6d.tar.zst apple_cmds-0d0ad219a6366e30e1b1ae41f79c8e10a21ade6d.zip |
shell_cmds: All compiled
Diffstat (limited to 'shell_cmds/who/utmpentry.c')
-rw-r--r-- | shell_cmds/who/utmpentry.c | 4 |
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)); |