summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2019-07-29 11:13:51 +0200
committerKarel Zak2019-07-29 11:13:51 +0200
commitefee3e01bf64e45a764b2af98e578deb20578f6b (patch)
tree566b57dadacd50644cd90716361b971e42eb5278
parentcolumn: fix outputing empty column at the end of line (diff)
parentlscpu: prefer memcpy() to manual pointer arithmetic (diff)
downloadkernel-qcow2-util-linux-efee3e01bf64e45a764b2af98e578deb20578f6b.tar.gz
kernel-qcow2-util-linux-efee3e01bf64e45a764b2af98e578deb20578f6b.tar.xz
kernel-qcow2-util-linux-efee3e01bf64e45a764b2af98e578deb20578f6b.zip
Merge branch '2019wk29' of https://github.com/kerolasa/util-linux
* '2019wk29' of https://github.com/kerolasa/util-linux: lscpu: prefer memcpy() to manual pointer arithmetic
-rw-r--r--sys-utils/lscpu-dmi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/lscpu-dmi.c b/sys-utils/lscpu-dmi.c
index 29bd2e4fc..82d8ed443 100644
--- a/sys-utils/lscpu-dmi.c
+++ b/sys-utils/lscpu-dmi.c
@@ -80,7 +80,7 @@ static void to_dmi_header(struct dmi_header *h, uint8_t *data)
{
h->type = data[0];
h->length = data[1];
- h->handle = WORD(data + 2);
+ memcpy(&h->handle, data + 2, sizeof(h->handle));
h->data = data;
}