From: Jonathan Cameron Date: Fri, 15 Apr 2011 17:56:00 +0000 (+0100) Subject: staging:iio:documentation make read_size signed to allow for errors. X-Git-Tag: firefly_0821_release~7613^2~1326^2~678 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c77b38108d6aaae05823e02d7df28b6e0d5ffdad;p=firefly-linux-kernel-4.4.55.git 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 --- 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;