android_kernel_oneplus_msm8998/tools/perf
Arnaldo Carvalho de Melo 6052d03fc9 perf help: Remove needless use of strncpy()
commit b6313899f4ed2e76b8375cf8069556f5b94fbff0 upstream.

Since we make sure the destination buffer has at least strlen(orig) + 1,
no need to do a strncpy(dest, orig, strlen(orig)), just use strcpy(dest,
orig).

This silences this gcc 8.2 warning on Alpine Linux:

  In function 'add_man_viewer',
      inlined from 'perf_help_config' at builtin-help.c:284:3:
  builtin-help.c:192:2: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
    strncpy((*p)->name, name, len);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  builtin-help.c: In function 'perf_help_config':
  builtin-help.c:187:15: note: length computed here
    size_t len = strlen(name);
                 ^~~~~~~~~~~~

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Fixes: 0780060124 ("perf_counter tools: add in basic glue from Git")
Link: https://lkml.kernel.org/n/tip-2f69l7drca427ob4km8i7kvo@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-10 09:56:34 +02:00
..
arch perf tools: Add Hygon Dhyana support 2019-02-20 10:13:06 +01:00
bench perf bench numa: Add define for RUSAGE_THREAD if not present 2019-06-11 12:23:50 +02:00
config perf tools: Move syscall number fallbacks from perf-sys.h to tools/arch/x86/include/asm/ 2018-07-19 15:35:57 +02:00
Documentation perf stat: Document --detailed option 2016-05-04 14:48:53 -07:00
python perf python: Support the PERF_RECORD_SWITCH event 2015-10-07 19:41:50 -03:00
scripts perf script python: Fix export-to-postgresql.py occasional failure 2018-10-20 09:52:34 +02:00
tests perf tests: Fix a memory leak in test__perf_evsel__tp_sched_test() 2019-04-27 09:33:57 +02:00
trace/strace/groups
ui perf ui helpline: Use strlcpy() as a shorter form of strncpy() + explicit set nul 2019-07-10 09:56:34 +02:00
util perf tools: No need to include bitops.h in util.h 2019-06-11 12:23:53 +02:00
.gitignore
Build
builtin-annotate.c
builtin-bench.c perf bench: Run benchmarks, don't test them 2015-10-19 16:10:25 -03:00
builtin-buildid-cache.c
builtin-buildid-list.c perf buildid-list: Fix return value of perf buildid-list -k 2015-12-07 12:02:10 -03:00
builtin-data.c
builtin-diff.c
builtin-evlist.c perf tools: Introduce usage_with_options_msg() 2015-10-27 09:28:44 -03:00
builtin-help.c perf help: Remove needless use of strncpy() 2019-07-10 09:56:34 +02:00
builtin-inject.c perf inject: Also re-pipe lost_samples event 2015-11-13 12:23:12 -03:00
builtin-kmem.c
builtin-kvm.c
builtin-list.c perf list: Do event name substring search as last resort when no events found 2015-10-01 12:12:22 -03:00
builtin-lock.c
builtin-mem.c
builtin-probe.c perf probe: Return errno when not hitting any event 2018-03-22 09:23:20 +01:00
builtin-record.c perf record: Add clang options for compiling BPF scripts 2015-10-29 17:16:22 -03:00
builtin-report.c perf symbols: Allow forcing reading of non-root owned files by root 2015-11-12 18:58:18 -03:00
builtin-sched.c perf sched latency: Fix thread pid reuse issue 2015-11-05 12:51:00 -03:00
builtin-script.c perf script: Use readdir() instead of deprecated readdir_r() 2017-07-15 11:57:48 +02:00
builtin-stat.c perf stat: Make stat options global 2015-11-05 17:54:34 -03:00
builtin-timechart.c
builtin-top.c perf top: Fix error handling in cmd_top() 2019-04-27 09:33:57 +02:00
builtin-trace.c perf trace: Add mmap alias for s390 2018-04-13 19:50:16 +02:00
builtin.h
command-list.txt
CREDITS
design.txt
Makefile perf tools: Disable parallelism for 'make clean' 2018-11-10 07:41:41 -08:00
Makefile.perf perf bench: Copy kernel files needed to build mem{cpy,set} x86_64 benchmarks 2019-03-23 08:44:37 +01:00
MANIFEST perf bench: Copy kernel files needed to build mem{cpy,set} x86_64 benchmarks 2019-03-23 08:44:37 +01:00
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h perf tools: Move syscall number fallbacks from perf-sys.h to tools/arch/x86/include/asm/ 2018-07-19 15:35:57 +02:00
perf-with-kcore.sh
perf.c perf tools: Enable passing bpf object file to --event 2015-10-28 12:48:12 -03:00
perf.h perf tools: Allow overriding MAX_NR_CPUS at compile time 2018-09-19 22:48:57 +02:00