lkml.org 
[lkml]   [2015]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/zswap: change incorrect strncmp use to strcmp
On Fri, 11 Dec 2015 18:33:11 -0500 Dan Streetman <ddstreet@ieee.org> wrote:

> 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.

whoops

> 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.
>

Thanks, I'll queue this for 4.4.


\
 
 \ /
  Last update: 2015-12-12 01:01    [W:0.028 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site