Skip to content

Commit

Permalink
usbip: remove unneeded structure
Browse files Browse the repository at this point in the history
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: Julia Lawall <[email protected]>
Acked-by: Valentina Manea <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
JuliaLawall authored and gregkh committed Dec 3, 2014
1 parent e1fd1dc commit b19e5f0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tools/usb/usbip/src/usbipd.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ static void usbipd_help(void)
static int recv_request_import(int sockfd)
{
struct op_import_request req;
struct op_common reply;
struct usbip_exported_device *edev;
struct usbip_usb_device pdu_udev;
struct list_head *i;
Expand All @@ -100,7 +99,6 @@ static int recv_request_import(int sockfd)
int rc;

memset(&req, 0, sizeof(req));
memset(&reply, 0, sizeof(reply));

rc = usbip_net_recv(sockfd, &req, sizeof(req));
if (rc < 0) {
Expand Down

0 comments on commit b19e5f0

Please sign in to comment.