summaryrefslogtreecommitdiffstats
path: root/src/fw-iso.c
diff options
context:
space:
mode:
authorGravatar Erik Hovland 2008-09-30 14:05:32 -0700
committerGravatar Dan Dennedy 2008-10-28 22:52:32 -0700
commit038f5f5c98612f637735e4f4752d8ca8108b0ef6 (patch)
tree95070179dbdabf07d03e1f3c55aa95688bc87d96 /src/fw-iso.c
parentCompare unsigned values instead of subtracting them. (diff)
Make sure that we have the right types.
When an unsigned type is assigned a signed value, the negatived value is never seen. Signed-off-by: Erik Hovland <erik@hovland.org> Signed-off-by: Dan Dennedy <dan@dennedy.org>
Diffstat (limited to '')
-rw-r--r--src/fw-iso.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fw-iso.c b/src/fw-iso.c
index 9e66fff..8c0dc6b 100644
--- a/src/fw-iso.c
+++ b/src/fw-iso.c
@@ -260,6 +260,7 @@ int fw_iso_xmit_write(raw1394handle_t handle, unsigned char *data,
struct fw_cdev_queue_iso queue_iso;
struct fw_cdev_start_iso start_iso;
struct fw_cdev_iso_packet *p;
+ int retval;
if (len > fwhandle->iso.max_packet_size) {
errno = EINVAL;
@@ -284,10 +285,10 @@ int fw_iso_xmit_write(raw1394handle_t handle, unsigned char *data,
start_iso.cycle = fwhandle->iso.start_on_cycle;
start_iso.handle = 0;
- len = ioctl(fwhandle->iso.fd,
+ retval = ioctl(fwhandle->iso.fd,
FW_CDEV_IOC_START_ISO, &start_iso);
- if (len < 0)
- return len;
+ if (retval < 0)
+ return retval;
}
return 0;