summaryrefslogtreecommitdiff
path: root/fs/kernfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-11-30 14:45:01 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-08 13:03:35 +0100
commitf5028606c29248d39c8fba26730517c7c624cdaa (patch)
treead5c6914ffe8de84c829e7f9009be56c8cd09450 /fs/kernfs
parent23df63002205f17d307af118fe0025f6e49d389a (diff)
unifdef: use memcpy instead of strncpy
commit 38c7b224ce22c25fed04007839edf974bd13439d upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/kernfs')
0 files changed, 0 insertions, 0 deletions