summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-06-08 10:18:12 +0000
committerpeter <peter@FreeBSD.org>1996-06-08 10:18:12 +0000
commitfb2da8f1bf40deec102194a8ad9a8afe01147e37 (patch)
tree34ae4bff92dc3819bafa02204e51dae2973f57f4
parent29f6977880e0deaaa21d3eb3f258721eca81f3b1 (diff)
downloadFreeBSD-src-fb2da8f1bf40deec102194a8ad9a8afe01147e37.zip
FreeBSD-src-fb2da8f1bf40deec102194a8ad9a8afe01147e37.tar.gz
Eliminate a struct copy that gcc doesn't inline and ends up as a call to
memset().
-rw-r--r--sys/dev/si/si.c4
-rw-r--r--sys/i386/isa/si.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index 72309a7..b9498c4 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.40 1996/05/08 04:48:25 peter Exp $
+ * $Id: si.c,v 1.41 1996/05/30 23:41:35 peter Exp $
*/
#ifndef lint
@@ -267,7 +267,7 @@ si_registerdev(id)
struct isa_device *id;
{
if (id->id_unit != 0) {
- si_kdc[id->id_unit] = si_kdc[0]; /* struct copy */
+ bcopy(&si_kdc[0], &si_kdc[id->id_unit], sizeof(si_kdc[0]));
}
si_kdc[id->id_unit].kdc_unit = id->id_unit;
si_kdc[id->id_unit].kdc_isa = id;
diff --git a/sys/i386/isa/si.c b/sys/i386/isa/si.c
index 72309a7..b9498c4 100644
--- a/sys/i386/isa/si.c
+++ b/sys/i386/isa/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.40 1996/05/08 04:48:25 peter Exp $
+ * $Id: si.c,v 1.41 1996/05/30 23:41:35 peter Exp $
*/
#ifndef lint
@@ -267,7 +267,7 @@ si_registerdev(id)
struct isa_device *id;
{
if (id->id_unit != 0) {
- si_kdc[id->id_unit] = si_kdc[0]; /* struct copy */
+ bcopy(&si_kdc[0], &si_kdc[id->id_unit], sizeof(si_kdc[0]));
}
si_kdc[id->id_unit].kdc_unit = id->id_unit;
si_kdc[id->id_unit].kdc_isa = id;
OpenPOWER on IntegriCloud