diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2015-11-09 13:29:39 -0500 |
|---|---|---|
| committer | Dan Williams <dan.j.williams@intel.com> | 2015-11-09 13:29:39 -0500 |
| commit | 85ce230051c37dfb979385eb0244bf3655625ba6 (patch) | |
| tree | 90abeab25f8c1ea4836b38279790b90f0c780ae3 /lib | |
| parent | 538ea4aa44737127ce2b5c8511c7349d2abdcf9c (diff) | |
| parent | 209851649dc4f7900a6bfe1de5e2640ab2c7d931 (diff) | |
Merge branch 'for-4.4/hotplug' into libnvdimm-for-next
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig | 1 | ||||
| -rw-r--r-- | lib/string.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index 2e491ac15622..f0df318104e7 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -220,6 +220,7 @@ config ZLIB_INFLATE config ZLIB_DEFLATE tristate + select BITREVERSE config LZO_COMPRESS tristate diff --git a/lib/string.c b/lib/string.c index 8dbb7b1eab50..84775ba873b9 100644 --- a/lib/string.c +++ b/lib/string.c @@ -203,12 +203,13 @@ ssize_t strscpy(char *dest, const char *src, size_t count) unsigned long c, data; c = *(unsigned long *)(src+res); - *(unsigned long *)(dest+res) = c; if (has_zero(c, &data, &constants)) { data = prep_zero_mask(c, data, &constants); data = create_zero_mask(data); + *(unsigned long *)(dest+res) = c & zero_bytemask(data); return res + find_zero(data); } + *(unsigned long *)(dest+res) = c; res += sizeof(unsigned long); count -= sizeof(unsigned long); max -= sizeof(unsigned long); |
