Re: [PATCH] mm/zswap: change incorrect strncmp use to strcmp

From: Andrew Morton
Date: Fri Dec 11 2015 - 18:43:26 EST


On Fri, 11 Dec 2015 18:33:11 -0500 Dan Streetman <ddstreet@xxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/