fix warning from -Wsign-compare
This commit is contained in:
@@ -1082,7 +1082,7 @@ scsi_get_task_private_ptr(struct scsi_task *task)
|
|||||||
|
|
||||||
struct scsi_data_buffer {
|
struct scsi_data_buffer {
|
||||||
struct scsi_data_buffer *next;
|
struct scsi_data_buffer *next;
|
||||||
int len;
|
uint32_t len;
|
||||||
unsigned char *data;
|
unsigned char *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1091,6 +1091,9 @@ scsi_task_add_data_in_buffer(struct scsi_task *task, int len, unsigned char *buf
|
|||||||
{
|
{
|
||||||
struct scsi_data_buffer *data_buf;
|
struct scsi_data_buffer *data_buf;
|
||||||
|
|
||||||
|
if (len < 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
data_buf = scsi_malloc(task, sizeof(struct scsi_data_buffer));
|
data_buf = scsi_malloc(task, sizeof(struct scsi_data_buffer));
|
||||||
if (data_buf == NULL) {
|
if (data_buf == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user