Re: [PATCH] tcmu_rbd_open 'size' is expected to be signed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/03/2017 03:50 PM, David Butterfield wrote:
> tcmu_rbd_open 'size' is expected to be signed, as evidenced by
> the check "if (size < 0)" later in the function.
> 
> Signed-off-by: David Butterfield <dab21774@xxxxxxxxx>
> ---
>  rbd.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/rbd.c b/rbd.c
> index efd001f..ed50aa5 100644
> --- a/rbd.c
> +++ b/rbd.c
> @@ -384,7 +384,8 @@ static int tcmu_rbd_open(struct tcmu_device *dev)
>  	char *pool, *name;
>  	char *config;
>  	struct tcmu_rbd_state *state;
> -	uint64_t size, rbd_size;
> +	uint64_t rbd_size;
> +	ssize_t size;
>  	int ret, block_size;
>  
>  	state = calloc(1, sizeof(*state));

Can we just make it a int64_t to match the other handlers?

I will fix qcow.c.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux