staging:iio:documentation make read_size signed to allow for errors.
authorJonathan Cameron <jic23@cam.ac.uk>
Fri, 15 Apr 2011 17:56:00 +0000 (18:56 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 26 Apr 2011 00:23:11 +0000 (17:23 -0700)
Without this all hell breaks loose if you have no data.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/Documentation/generic_buffer.c

index 3cc18ab4ebfd357f347d9e4d48c62c229e002475..eb72e95f76f847f87cb8aad47d6320050d786db5 100644 (file)
@@ -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;