summaryrefslogtreecommitdiffstats
path: root/sys/dev/microcode
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2006-10-02 06:03:31 +0000
committerderaadt <deraadt@openbsd.org>2006-10-02 06:03:31 +0000
commit4455a16fec489eefdd65c53baebc871320471d0f (patch)
treea8e088628f821d012eb1ebab0245d5ad1d036944 /sys/dev/microcode
parentSince monitor mode works now, mention it. (diff)
downloadwireguard-openbsd-4455a16fec489eefdd65c53baebc871320471d0f.tar.xz
wireguard-openbsd-4455a16fec489eefdd65c53baebc871320471d0f.zip
remove variable we do not need
Diffstat (limited to 'sys/dev/microcode')
-rw-r--r--sys/dev/microcode/bnx/build.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/dev/microcode/bnx/build.c b/sys/dev/microcode/bnx/build.c
index 9b92760de7f..0d7a40fb3f8 100644
--- a/sys/dev/microcode/bnx/build.c
+++ b/sys/dev/microcode/bnx/build.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: build.c,v 1.2 2006/10/02 02:30:13 deraadt Exp $ */
+/* $OpenBSD: build.c,v 1.3 2006/10/02 06:03:31 deraadt Exp $ */
/*
* Copyright (c) 2004 Theo de Raadt <deraadt@openbsd.org>
@@ -67,15 +67,14 @@ int
main(int argc, char *argv[])
{
struct bnx_firmware_header bfproto, *bf;
- int len, fd, i, total;
+ int fd, i, total;
ssize_t rlen;
bnx_rv2p_proc1len = sizeof bnx_rv2p_proc1;
bnx_rv2p_proc2len = sizeof bnx_rv2p_proc2;
- len = sizeof(*bf);
- bf = (struct bnx_firmware_header *)malloc(len);
- bzero(bf, len);
+ bf = (struct bnx_firmware_header *)malloc(sizeof *bf);
+ bzero(bf, sizeof *bf);
/* initialize the file header */
bf->bnx_COM_b06FwReleaseMajor = bnx_COM_b06FwReleaseMajor;
@@ -146,10 +145,10 @@ main(int argc, char *argv[])
if (fd == -1)
err(1, FILENAME);
- rlen = write(fd, bf, len);
+ rlen = write(fd, bf, sizeof *bf);
if (rlen == -1)
err(1, "%s", FILENAME);
- if (rlen != len)
+ if (rlen != sizeof *bf)
errx(1, "%s: short write", FILENAME);
total = rlen;
printf(" [%d", total);