Page MenuHomeFreeBSD

D46014.diff
No OneTemporary

D46014.diff

diff --git a/usr.sbin/fwcontrol/fwcontrol.c b/usr.sbin/fwcontrol/fwcontrol.c
--- a/usr.sbin/fwcontrol/fwcontrol.c
+++ b/usr.sbin/fwcontrol/fwcontrol.c
@@ -207,7 +207,7 @@
struct fw_asyreq *asyreq;
u_int32_t *qld, res;
- asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 16);
+ asyreq = malloc(sizeof(*asyreq));
if (asyreq == NULL)
err(EX_SOFTWARE, "%s:asyreq malloc", __func__);
asyreq->req.len = 16;
@@ -262,7 +262,7 @@
{
struct fw_asyreq *asyreq;
- asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 12);
+ asyreq = malloc(sizeof(*asyreq));
if (asyreq == NULL)
err(EX_SOFTWARE, "%s:asyreq malloc", __func__);
asyreq->req.len = 12;
@@ -289,7 +289,7 @@
{
struct fw_asyreq *asyreq;
- asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 12);
+ asyreq = malloc(sizeof(*asyreq));
if (asyreq == NULL)
err(EX_SOFTWARE, "%s:asyreq malloc", __func__);
asyreq->req.len = 12;
@@ -308,7 +308,7 @@
{
struct fw_asyreq *asyreq;
- asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 16);
+ asyreq = malloc(sizeof(*asyreq));
if (asyreq == NULL)
err(EX_SOFTWARE, "%s:asyreq malloc", __func__);
asyreq->req.len = 16;

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 10, 11:05 AM (13 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15741980
Default Alt Text
D46014.diff (1 KB)

Event Timeline