提交 38dcdca3 编写于 作者: V Vaishali Thakkar 提交者: Mauro Carvalho Chehab

[media] pctv452e: Replace memset with eth_zero_addr

Use eth_zero_addr to assign the zero address to the given address
array instead of memset when second argument is address of zero.
Note that the 6 in the third argument of memset appears to represent
an ethernet address size (ETH_ALEN).

The Coccinelle semantic patch that makes this change is as follows:

// <smpl>
@eth_zero_addr@
expression e;
@@

-memset(e,0x00,6);
+eth_zero_addr(e);
// </smpl>
Signed-off-by: NVaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 8278780e
......@@ -611,7 +611,7 @@ static int pctv452e_read_mac_address(struct dvb_usb_device *d, u8 mac[6])
return 0;
failed:
memset(mac, 0, 6);
eth_zero_addr(mac);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册