diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/trace-event-read.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/trace-event-read.c b/tools/perf/util/trace-event-read.c index b12e4903739a..a1217a10632f 100644 --- a/tools/perf/util/trace-event-read.c +++ b/tools/perf/util/trace-event-read.c | |||
@@ -113,8 +113,11 @@ static char *read_string(void) | |||
113 | } | 113 | } |
114 | } | 114 | } |
115 | 115 | ||
116 | /* trailing \0: */ | ||
117 | i++; | ||
118 | |||
116 | /* move the file descriptor to the end of the string */ | 119 | /* move the file descriptor to the end of the string */ |
117 | r = lseek(input_fd, -(r - (i+1)), SEEK_CUR); | 120 | r = lseek(input_fd, -(r - i), SEEK_CUR); |
118 | if (r < 0) | 121 | if (r < 0) |
119 | die("lseek"); | 122 | die("lseek"); |
120 | 123 | ||