diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2017-08-28 05:46:45 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2017-08-28 05:46:45 +0000 |
commit | 4a9fce5e0080c827e3cc28451398b6af38926c6c (patch) | |
tree | 464d22ab9444b193aaac7d41864a708452568806 /sys/dev/microcode | |
parent | 8405f61f8cb1ab81666f77bc2f626e6ffad98d28 (diff) |
Fix clang warnings; ok guenther@ deraadt@
(guenther says: code could need a rewrite using writev(2) though)
Diffstat (limited to 'sys/dev/microcode')
-rw-r--r-- | sys/dev/microcode/kue/build.c | 6 | ||||
-rw-r--r-- | sys/dev/microcode/yds/build.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/microcode/kue/build.c b/sys/dev/microcode/kue/build.c index a162c8103dc..b6fd6fc4012 100644 --- a/sys/dev/microcode/kue/build.c +++ b/sys/dev/microcode/kue/build.c @@ -1,4 +1,4 @@ -/* $OpenBSD: build.c,v 1.7 2016/12/18 18:28:39 krw Exp $ */ +/* $OpenBSD: build.c,v 1.8 2017/08/28 05:46:44 otto Exp $ */ /* * Copyright (c) 2004 Theo de Raadt <deraadt@openbsd.org> @@ -47,10 +47,10 @@ main(int argc, char *argv[]) bcopy(kue_code_seg, &kf->data[0], sizeof(kue_code_seg)); - bcopy(kue_fix_seg, &kf->data[sizeof(kue_code_seg)], + bcopy(kue_fix_seg, &kf->data[0] + sizeof(kue_code_seg), sizeof(kue_fix_seg)); bcopy(kue_trig_seg, - &kf->data[sizeof(kue_code_seg) + sizeof(kue_fix_seg)], + &kf->data[0] + sizeof(kue_code_seg) + sizeof(kue_fix_seg), sizeof(kue_trig_seg)); printf("creating %s length %d [%zu+%zu+%zu]\n", diff --git a/sys/dev/microcode/yds/build.c b/sys/dev/microcode/yds/build.c index f515ff9b7b8..cf3f31512fc 100644 --- a/sys/dev/microcode/yds/build.c +++ b/sys/dev/microcode/yds/build.c @@ -1,4 +1,4 @@ -/* $OpenBSD: build.c,v 1.7 2016/12/18 18:28:39 krw Exp $ */ +/* $OpenBSD: build.c,v 1.8 2017/08/28 05:46:44 otto Exp $ */ /* * Copyright (c) 2004 Theo de Raadt <deraadt@openbsd.org> @@ -57,13 +57,13 @@ main(int argc, char *argv[]) bcopy(yds_dsp_mcode, &yf->data[0], sizeof(yds_dsp_mcode)); hswapn((u_int32_t *)&yf->data[0], sizeof(yds_dsp_mcode)); - bcopy(yds_ds1_ctrl_mcode, &yf->data[sizeof(yds_dsp_mcode)], + bcopy(yds_ds1_ctrl_mcode, &yf->data[0] + sizeof(yds_dsp_mcode), sizeof(yds_ds1_ctrl_mcode)); hswapn((u_int32_t *)&yf->data[sizeof(yds_dsp_mcode)], sizeof(yds_ds1_ctrl_mcode)); bcopy(yds_ds1e_ctrl_mcode, - &yf->data[sizeof(yds_dsp_mcode) + sizeof(yds_ds1_ctrl_mcode)], + &yf->data[0] + sizeof(yds_dsp_mcode) + sizeof(yds_ds1_ctrl_mcode), sizeof(yds_ds1e_ctrl_mcode)); hswapn((u_int32_t *)&yf->data[sizeof(yds_dsp_mcode) + sizeof(yds_ds1_ctrl_mcode)], |