]> git.baikalelectronics.ru Git - kernel.git/commit
mm/zswap: change incorrect strncmp use to strcmp
authorDan Streetman <ddstreet@ieee.org>
Fri, 18 Dec 2015 22:22:04 +0000 (14:22 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 18 Dec 2015 22:25:40 +0000 (14:25 -0800)
commitdbadf379a276b84686a55ff434acda4290251c31
tree3337c11e0321875600a1018315c254f25b5ee72b
parent2fbe89b209a7be45887721a9d1123d804da28ea2
mm/zswap: change incorrect strncmp use to strcmp

Change the use of strncmp in zswap_pool_find_get() to strcmp.

The use of strncmp is no longer correct, now that zswap_zpool_type is
not an array; sizeof() will return the size of a pointer, which isn't
the right length to compare.  We don't need to use strncmp anyway,
because the existing params and the passed in params are all guaranteed
to be null terminated, so strcmp should be used.

Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Reported-by: Weijie Yang <weijie.yang@samsung.com>
Cc: Seth Jennings <sjennings@variantweb.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/zswap.c