perf: Factor out strncpy() in perf_event_mmap_event()
authorOleg Nesterov <oleg@redhat.com>
Thu, 17 Oct 2013 18:24:17 +0000 (20:24 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 6 Nov 2013 11:34:28 +0000 (12:34 +0100)
commitc7e548b45ce85f765f6262149dd60d9956a31d60
tree2bdd4a20378e4881e88ba6af24724d68168c2915
parenta94d342b9cb09edfe888ea972af0883b6a8d992b
perf: Factor out strncpy() in perf_event_mmap_event()

While this is really minor, but strncpy() does the unnecessary
zero-padding till the end of tmp[16] and it is called every time
we are going to use the string literal.

Turn these strncpy()'s into the single strlcpy() under the new
label, saves 72 bytes.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20131017182417.GA17753@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c