perf record: Use correct return type for write()
Adrian Hunter
reviewerPATCH 1/1 perf record: Use correct return type for write()
write() returns a 'ssize_t' not an 'int'.
Signed-off-by Adrian Hunter <[email protected]>
--- tools/perf/builtin-record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-record.c +1 -1
@@ -81,7 +81,7 @@ static int write_output(struct perf_record *rec, void *buf, size_t size)struct perf_data_file *file = &rec->file;while (size) { -int ret =write (file->fd, buf, size); +ssize_t ret =write (file->fd, buf, size);if (ret <0 ) {pr_err ("failed to write perf data, error: %m\n" );
Signature · 1 line
1.7.11.7
tip-bot for Adrian Hunter
merge bot[tip:perf/urgent] perf record: Use correct return type for write( )
perf record: Use correct return type for write()
Commit-ID: 410f17860318f36b999a90138f50350e3dc49933 Gitweb: http://git.kernel.org/tip/410f17860318f36b999a90138f50350e3dc49933 Author: Adrian Hunter <[email protected]> AuthorDate: Fri, 8 Nov 2013 12:27:50 +0200 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Mon, 11 Nov 2013 15:56:40 -0300
perf record: Use correct return type for write()
write() returns a 'ssize_t' not an 'int'.
Signed-off-by Adrian Hunter <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/builtin-record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-record.c +1 -1
@@ -81,7 +81,7 @@ static int write_output(struct perf_record *rec, void *buf, size_t size)struct perf_data_file *file = &rec->file;while (size) { -int ret =write (file->fd, buf, size); +ssize_t ret =write (file->fd, buf, size);if (ret <0 ) {pr_err ("failed to write perf data, error: %m\n" );