Staging: wlan-ng: no need for memcpy() since its arguments are already equal
authorClaudiu Beznea <claudiu.beznea@gmail.com>
Fri, 25 Mar 2016 20:54:48 +0000 (22:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Mar 2016 19:43:14 +0000 (12:43 -0700)
This patch removes the memcpy() for two variables which were
previously tested with memcmp(). The result of memcmp() was
zero which means that the previously tested variables were
already equal.

Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/p80211conv.c

index bdb50a51483b7cef515fb7c6b9351a0059f2baea..6354036ffb4280f11af4b6fd9e7fc8dfdbe4450d 100644 (file)
@@ -243,7 +243,6 @@ static void orinoco_spy_gather(wlandevice_t *wlandev, char *mac,
 
        for (i = 0; i < wlandev->spy_number; i++) {
                if (!memcmp(wlandev->spy_address[i], mac, ETH_ALEN)) {
-                       memcpy(wlandev->spy_address[i], mac, ETH_ALEN);
                        wlandev->spy_stat[i].level = rxmeta->signal;
                        wlandev->spy_stat[i].noise = rxmeta->noise;
                        wlandev->spy_stat[i].qual =