Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Replace some memcpy()s with probably overlapping ar...
details: https://anonhg.NetBSD.org/src/rev/027c16d89eaf
branches: trunk
changeset: 513132:027c16d89eaf
user: wiz <wiz%NetBSD.org@localhost>
date: Tue Jul 24 22:29:07 2001 +0000
description:
Replace some memcpy()s with probably overlapping arguments with memmove()s.
diffstat:
sys/arch/i386/isa/pccons.c | 14 +++++++-------
sys/arch/x86_64/isa/pccons.c | 14 +++++++-------
2 files changed, 14 insertions(+), 14 deletions(-)
diffs (112 lines):
diff -r f22ae019e982 -r 027c16d89eaf sys/arch/i386/isa/pccons.c
--- a/sys/arch/i386/isa/pccons.c Tue Jul 24 21:55:35 2001 +0000
+++ b/sys/arch/i386/isa/pccons.c Tue Jul 24 22:29:07 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pccons.c,v 1.147 2001/06/02 00:46:00 jdolecek Exp $ */
+/* $NetBSD: pccons.c,v 1.148 2001/07/24 22:29:08 wiz Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -1545,8 +1545,8 @@
else if (cx > nrow)
cx = nrow;
if (cx < nrow)
- memcpy(crtAt,
- crtAt + vs.ncol * cx,
+ memmove(crtAt,
+ crtAt + vs.ncol * cx,
vs.ncol *
(nrow - cx) * CHR);
fillw((vs.at << 8) | ' ',
@@ -1562,7 +1562,7 @@
else if (cx > vs.nrow)
cx = vs.nrow;
if (cx < vs.nrow)
- memcpy(Crtat,
+ memmove(Crtat,
Crtat + vs.ncol * cx,
vs.ncol *
(vs.nrow - cx) * CHR);
@@ -1585,7 +1585,7 @@
else if (cx > nrow)
cx = nrow;
if (cx < nrow)
- memcpy(crtAt + vs.ncol * cx,
+ memmove(crtAt + vs.ncol * cx,
crtAt,
vs.ncol * (nrow - cx) *
CHR);
@@ -1601,7 +1601,7 @@
else if (cx > vs.nrow)
cx = vs.nrow;
if (cx < vs.nrow)
- memcpy(Crtat + vs.ncol * cx,
+ memmove(Crtat + vs.ncol * cx,
Crtat,
vs.ncol * (vs.nrow - cx) *
CHR);
@@ -1669,7 +1669,7 @@
scroll = 0;
/* scroll check */
if (crtat >= Crtat + vs.nchr) {
- memcpy(Crtat, Crtat + vs.ncol,
+ memmove(Crtat, Crtat + vs.ncol,
(vs.nchr - vs.ncol) * CHR);
fillw((vs.at << 8) | ' ',
Crtat + vs.nchr - vs.ncol,
diff -r f22ae019e982 -r 027c16d89eaf sys/arch/x86_64/isa/pccons.c
--- a/sys/arch/x86_64/isa/pccons.c Tue Jul 24 21:55:35 2001 +0000
+++ b/sys/arch/x86_64/isa/pccons.c Tue Jul 24 22:29:07 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pccons.c,v 1.1 2001/06/19 00:20:33 fvdl Exp $ */
+/* $NetBSD: pccons.c,v 1.2 2001/07/24 22:29:07 wiz Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -1544,8 +1544,8 @@
else if (cx > nrow)
cx = nrow;
if (cx < nrow)
- memcpy(crtAt,
- crtAt + vs.ncol * cx,
+ memmove(crtAt,
+ crtAt + vs.ncol * cx,
vs.ncol *
(nrow - cx) * CHR);
fillw((vs.at << 8) | ' ',
@@ -1561,7 +1561,7 @@
else if (cx > vs.nrow)
cx = vs.nrow;
if (cx < vs.nrow)
- memcpy(Crtat,
+ memmove(Crtat,
Crtat + vs.ncol * cx,
vs.ncol *
(vs.nrow - cx) * CHR);
@@ -1584,7 +1584,7 @@
else if (cx > nrow)
cx = nrow;
if (cx < nrow)
- memcpy(crtAt + vs.ncol * cx,
+ memmove(crtAt + vs.ncol * cx,
crtAt,
vs.ncol * (nrow - cx) *
CHR);
@@ -1600,7 +1600,7 @@
else if (cx > vs.nrow)
cx = vs.nrow;
if (cx < vs.nrow)
- memcpy(Crtat + vs.ncol * cx,
+ memmove(Crtat + vs.ncol * cx,
Crtat,
vs.ncol * (vs.nrow - cx) *
CHR);
@@ -1668,7 +1668,7 @@
scroll = 0;
/* scroll check */
if (crtat >= Crtat + vs.nchr) {
- memcpy(Crtat, Crtat + vs.ncol,
+ memmove(Crtat, Crtat + vs.ncol,
(vs.nchr - vs.ncol) * CHR);
fillw((vs.at << 8) | ' ',
Crtat + vs.nchr - vs.ncol,
Home |
Main Index |
Thread Index |
Old Index