Use (void) memcpy(), not (void *) memcpy()

This was caught by Clang.  Clearly the intent of this code was
to explicitly ignore the return value.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3054
This commit is contained in:
Richard Yao 2014-07-18 18:32:13 -04:00 committed by Brian Behlendorf
parent 6466b61db6
commit f9f431cd28
1 changed files with 3 additions and 3 deletions

View File

@ -861,11 +861,11 @@ write_pmbr(int fd, struct dk_gpt *vtoc)
/* LINTED -- always longlong aligned */ /* LINTED -- always longlong aligned */
dk_ioc.dki_data = (efi_gpt_t *)buf; dk_ioc.dki_data = (efi_gpt_t *)buf;
if (efi_ioctl(fd, DKIOCGETEFI, &dk_ioc) == -1) { if (efi_ioctl(fd, DKIOCGETEFI, &dk_ioc) == -1) {
(void *) memcpy(&mb, buf, sizeof (mb)); (void) memcpy(&mb, buf, sizeof (mb));
bzero(&mb, sizeof (mb)); bzero(&mb, sizeof (mb));
mb.signature = LE_16(MBB_MAGIC); mb.signature = LE_16(MBB_MAGIC);
} else { } else {
(void *) memcpy(&mb, buf, sizeof (mb)); (void) memcpy(&mb, buf, sizeof (mb));
if (mb.signature != LE_16(MBB_MAGIC)) { if (mb.signature != LE_16(MBB_MAGIC)) {
bzero(&mb, sizeof (mb)); bzero(&mb, sizeof (mb));
mb.signature = LE_16(MBB_MAGIC); mb.signature = LE_16(MBB_MAGIC);
@ -905,7 +905,7 @@ write_pmbr(int fd, struct dk_gpt *vtoc)
*cp++ = 0xff; *cp++ = 0xff;
} }
(void *) memcpy(buf, &mb, sizeof (mb)); (void) memcpy(buf, &mb, sizeof (mb));
/* LINTED -- always longlong aligned */ /* LINTED -- always longlong aligned */
dk_ioc.dki_data = (efi_gpt_t *)buf; dk_ioc.dki_data = (efi_gpt_t *)buf;
dk_ioc.dki_lba = 0; dk_ioc.dki_lba = 0;