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>
This commit is contained in:
parent
8ad324c971
commit
038f5f5c98
|
@ -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;
|
||||
|
|
8
src/fw.c
8
src/fw.c
|
@ -1176,14 +1176,14 @@ fw_lock(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
|||
quadlet_t *result)
|
||||
{
|
||||
quadlet_t buffer[2];
|
||||
size_t length;
|
||||
ssize_t length;
|
||||
|
||||
length = setup_lock(extcode, data, arg, buffer);
|
||||
if (length < 0)
|
||||
return length;
|
||||
|
||||
return send_request_sync(handle, 16 + extcode, node, addr,
|
||||
length, buffer, result);
|
||||
(size_t) length, buffer, result);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1192,14 +1192,14 @@ fw_lock64(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
|||
octlet_t *result)
|
||||
{
|
||||
octlet_t buffer[2];
|
||||
size_t length;
|
||||
ssize_t length;
|
||||
|
||||
length = setup_lock64(extcode, data, arg, buffer);
|
||||
if (length < 0)
|
||||
return length;
|
||||
|
||||
return send_request_sync(handle, 16 + extcode, node, addr,
|
||||
length, buffer, result);
|
||||
(size_t) length, buffer, result);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Reference in New Issue