Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1290021
| From | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm/zswap: change incorrect strncmp use to strcmp |
| Date | 2015-12-12 00:50 +0100 |
| Message-ID | <qEFBM-2LA-7@gated-at.bofh.it> (permalink) |
| References | <qEFs6-2HI-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] mm/zswap: change incorrect strncmp use to strcmp Dan Streetman <ddstreet@ieee.org> - 2015-12-12 00:40 +0100 Re: [PATCH] mm/zswap: change incorrect strncmp use to strcmp Andrew Morton <akpm@linux-foundation.org> - 2015-12-12 00:50 +0100
csiph-web