]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usbip: remove unneeded structure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 30 Nov 2014 18:14:15 +0000 (19:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Dec 2014 00:15:02 +0000 (16:15 -0800)
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 <Julia.Lawall@lip6.fr>
Acked-by: Valentina Manea <valentina.manea.m@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/usb/usbip/src/usbipd.c

index 2f87f2d348ba66c453145d28cdfae97fe4daed6b..2a7cd2b8d96632e34578a36a062aadbc140e34d0 100644 (file)
@@ -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;
@@ -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) {