From c77b38108d6aaae05823e02d7df28b6e0d5ffdad Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Fri, 15 Apr 2011 18:56:00 +0100 Subject: [PATCH] staging:iio:documentation make read_size signed to allow for errors. Without this all hell breaks loose if you have no data. Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/Documentation/generic_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/Documentation/generic_buffer.c b/drivers/staging/iio/Documentation/generic_buffer.c index 3cc18ab4ebfd..eb72e95f76f8 100644 --- a/drivers/staging/iio/Documentation/generic_buffer.c +++ b/drivers/staging/iio/Documentation/generic_buffer.c @@ -132,7 +132,7 @@ int main(int argc, char **argv) int datardytrigger = 1; char *data; - size_t read_size; + ssize_t read_size; struct iio_event_data dat; int dev_num, trig_num; char *buffer_access, *buffer_event; -- 2.30.2