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-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c77b38108d6aaae05823e02d7df28b6e0d5ffdad;p=openwrt%2Fstaging%2Fblogic.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;