diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-11-30 14:45:01 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-13 09:21:28 +0100 |
| commit | 37370fadd2da79e42f2e4dcb4bf9552293be0f09 (patch) | |
| tree | f6e44275407053226c555e8adfe9fcd2aec017cc /tools/perf/scripts/python | |
| parent | 204a765ede2641c7aab8aec4b0cf08079367d02e (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 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
