diff options
-rw-r--r-- | tools/perf/util/header.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 450384b3bbe5..95a44bcfc2dc 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -213,9 +213,10 @@ struct perf_header *perf_header__read(int fd) for (i = 0; i < nr_attrs; i++) { struct perf_header_attr *attr; - off_t tmp = lseek(fd, 0, SEEK_CUR); + off_t tmp; do_read(fd, &f_attr, sizeof(f_attr)); + tmp = lseek(fd, 0, SEEK_CUR); attr = perf_header_attr__new(&f_attr.attr); |