aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-11-30 14:45:01 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-11-30 14:45:01 -0800
commit38c7b224ce22c25fed04007839edf974bd13439d (patch)
tree036a6170d809343dbd5969efbc937667398b56bb /include
parentMerge tag 'char-misc-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc (diff)
downloadlinux-dev-38c7b224ce22c25fed04007839edf974bd13439d.tar.xz
linux-dev-38c7b224ce22c25fed04007839edf974bd13439d.zip
unifdef: use memcpy instead of strncpy
New versions of gcc reasonably warn about the odd pattern of strncpy(p, q, strlen(q)); which really doesn't make sense: the strncpy() ends up being just a slow and odd way to write memcpy() in this case. There was a comment about _why_ the code used strncpy - to avoid the terminating NUL byte, but memcpy does the same and avoids the warning. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions