[PATCH] perf record: Use correct return type for write()

From: Adrian Hunter
Date: Fri Nov 08 2013 - 05:21:08 EST


write() returns a 'ssize_t' not an 'int'.

Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
---
tools/perf/builtin-record.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 15280b5..20df1f3 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -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");
--
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/