Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/who revert previous; i meant to test first and if yo...
details: https://anonhg.NetBSD.org/src/rev/1983ac9e06ce
branches: trunk
changeset: 1003902:1983ac9e06ce
user: mrg <mrg%NetBSD.org@localhost>
date: Fri Oct 04 11:43:07 2019 +0000
description:
revert previous; i meant to test first and if you read the comment
immediately above, you can see it is done safely and on purpose.
diffstat:
usr.bin/who/utmpentry.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (44 lines):
diff -r 6d83c39565f3 -r 1983ac9e06ce usr.bin/who/utmpentry.c
--- a/usr.bin/who/utmpentry.c Fri Oct 04 11:40:43 2019 +0000
+++ b/usr.bin/who/utmpentry.c Fri Oct 04 11:43:07 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: utmpentry.c,v 1.19 2019/10/04 11:40:43 mrg Exp $ */
+/* $NetBSD: utmpentry.c,v 1.20 2019/10/04 11:43:07 mrg Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: utmpentry.c,v 1.19 2019/10/04 11:40:43 mrg Exp $");
+__RCSID("$NetBSD: utmpentry.c,v 1.20 2019/10/04 11:43:07 mrg Exp $");
#endif
#include <sys/stat.h>
@@ -283,9 +283,9 @@
* reason we use the size of the _source_ as the length
* argument.
*/
- (void)strncpy(e->name, up->ut_name, sizeof(e->name));
- (void)strncpy(e->line, up->ut_line, sizeof(e->line));
- (void)strncpy(e->host, up->ut_host, sizeof(e->host));
+ (void)strncpy(e->name, up->ut_name, sizeof(up->ut_name));
+ (void)strncpy(e->line, up->ut_line, sizeof(up->ut_line));
+ (void)strncpy(e->host, up->ut_host, sizeof(up->ut_host));
e->tv.tv_sec = up->ut_time;
e->tv.tv_usec = 0;
@@ -314,9 +314,9 @@
* reason we use the size of the _source_ as the length
* argument.
*/
- (void)strncpy(e->name, up->ut_name, sizeof(e->name));
- (void)strncpy(e->line, up->ut_line, sizeof(e->line));
- (void)strncpy(e->host, up->ut_host, sizeof(e->host));
+ (void)strncpy(e->name, up->ut_name, sizeof(up->ut_name));
+ (void)strncpy(e->line, up->ut_line, sizeof(up->ut_line));
+ (void)strncpy(e->host, up->ut_host, sizeof(up->ut_host));
e->tv = up->ut_tv;
e->pid = up->ut_pid;
Home |
Main Index |
Thread Index |
Old Index