summaryrefslogtreecommitdiff
path: root/tools/perf/util/target.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/target.c')
-rw-r--r--tools/perf/util/target.c4
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,
if (err != buf) {
size_t len = strlen(err);
- char *c = mempcpy(buf, err, min(buflen - 1, len));
- *c = '\0';
+ memcpy(buf, err, min(buflen - 1, len));
+ *(buf + min(buflen - 1, len)) = '\0';
}
return 0;