diff options
Diffstat (limited to 'tools/perf/util/target.c')
-rw-r--r-- | tools/perf/util/target.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c index 051eaa68095e..065528b7563e 100644 --- a/tools/perf/util/target.c +++ b/tools/perf/util/target.c | |||
@@ -117,8 +117,8 @@ int perf_target__strerror(struct perf_target *target, int errnum, | |||
117 | 117 | ||
118 | if (err != buf) { | 118 | if (err != buf) { |
119 | size_t len = strlen(err); | 119 | size_t len = strlen(err); |
120 | char *c = mempcpy(buf, err, min(buflen - 1, len)); | 120 | memcpy(buf, err, min(buflen - 1, len)); |
121 | *c = '\0'; | 121 | *(buf + min(buflen - 1, len)) = '\0'; |
122 | } | 122 | } |
123 | 123 | ||
124 | return 0; | 124 | return 0; |