]> git.baikalelectronics.ru Git - kernel.git/commit
staging: ks7010: fix checkpatch memset warning
authorTobin C. Harding <me@tobin.cc>
Mon, 13 Mar 2017 22:54:08 +0000 (09:54 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Mar 2017 00:08:15 +0000 (08:08 +0800)
commit91e8751432ae261e0bda7bbdd407a006f7c76568
tree08f851960cb3b3b8bfed27b09ec65016ab189492
parentba8bf765d6b192cd4ea11cc5a48cacb863a337fa
staging: ks7010: fix checkpatch memset warning

Checkpatch emits WARNING: single byte memset is suspicious. Swapped
2nd/3rd argument? Call site in question is correct but is an unusual
use of memset() to zero a single byte. The same can be achieved by
assigning 0 directly to the memory location.

Dereference pointer and assign 0 to that memory location. Use '\0' to
make explicit that it is a char pointer.

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