提交 b19e5f04 编写于 作者: J Julia Lawall 提交者: Greg Kroah-Hartman

usbip: remove unneeded structure

Delete a local structure that is only used to be initialized by memset.

A semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier x,i;
@@

{
... when any
-struct i x;
<+... when != x
- memset(&x,...);
...+>
}
// </smpl>
Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
Acked-by: NValentina Manea <valentina.manea.m@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e1fd1dc8
...@@ -91,7 +91,6 @@ static void usbipd_help(void) ...@@ -91,7 +91,6 @@ static void usbipd_help(void)
static int recv_request_import(int sockfd) static int recv_request_import(int sockfd)
{ {
struct op_import_request req; struct op_import_request req;
struct op_common reply;
struct usbip_exported_device *edev; struct usbip_exported_device *edev;
struct usbip_usb_device pdu_udev; struct usbip_usb_device pdu_udev;
struct list_head *i; struct list_head *i;
...@@ -100,7 +99,6 @@ static int recv_request_import(int sockfd) ...@@ -100,7 +99,6 @@ static int recv_request_import(int sockfd)
int rc; int rc;
memset(&req, 0, sizeof(req)); memset(&req, 0, sizeof(req));
memset(&reply, 0, sizeof(reply));
rc = usbip_net_recv(sockfd, &req, sizeof(req)); rc = usbip_net_recv(sockfd, &req, sizeof(req));
if (rc < 0) { if (rc < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册