OSDN Git Service

staging: ks7010: simplify calls to memcpy()
authorTobin C. Harding <me@tobin.cc>
Mon, 10 Apr 2017 03:15:50 +0000 (13:15 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Apr 2017 14:05:50 +0000 (16:05 +0200)
commitb121d84882b97b8668be0b95e9ba50cfd01aa0f1
treed3e538eebfd6374b05871558eef8682cacb6ee1a
parent9ff19a6e35ab460c07dc40c563b57b0ad866e2e9
staging: ks7010: simplify calls to memcpy()

Function uses overly complex calls to memcpy(). Code may be simplified
by the use of a local variable. Code sometimes uses explicit address
of initial array element and sometimes does not. Uniformity aids
readability. If array pointers are explicit it aids readability further.

Simplify calls to memcpy(). Add local pointer variable, define it to
the correct memory location. Use newly defined variable in calls to
memcpy(). Be uniform in use of explicit address of first element of
array (&foo[0]).

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_wlan_net.c