diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2015-10-12 16:45:22 +0200 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2015-10-12 16:45:22 +0200 |
commit | 73980b8570a925dc34b6c9926b7d5eeeb5bee0d8 (patch) | |
tree | 2540ec40e0fef5e511a28ba5ca190b3f8b39c010 | |
parent | b2d008f1d28512ae911d87526742af1a8bb01046 (diff) |
Fix 32/64bits issue.
ioctl fills a 32bits value. With the nr_bytes being ssize_t, on a 64b
architecture it is a 64b variable, leading to wrong results.
Fix this by converting nr_bytes to an integer.
Reported-by: Thomas Petazonni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r-- | aep.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -489,9 +489,10 @@ static int aep_read_frame(struct aep_device *dev, struct aep_frame *frame, int nr_frame, unsigned char *buffer) { ssize_t len, frame_size; - ssize_t nr_bytes, bytes_read; + ssize_t bytes_read; ssize_t aux = 0; struct timeval now; + int nr_bytes; int i = 0; /* |