diff options
| author | Takashi Iwai <tiwai@suse.de> | 2015-10-23 06:57:50 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2015-10-23 06:57:50 +0200 |
| commit | 274035751e25ee15a064e43cde7b4e7a9b75d921 (patch) | |
| tree | bf5f3f18f14855043324ef02a116532d866e3dac /lib | |
| parent | 53e597b1d194910bef53ed0632da329fef497904 (diff) | |
| parent | a5be88f63eaff1c03774aecd7388015cb87f6b2c (diff) | |
Merge branch 'topic/hw-constraint-single' into 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); |
