Re: [PATCH v2 45/72] libmultipath: fix -Wsign-compare warnings with snprintf()

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

 



On 2019-10-24 08:06, Martin Wilck wrote:
> +#define safe_snprintf(var, size, format, args...)			\
> +	({								\
> +		size_t __size = size;					\
> +		int __ret;						\
> +									\
> +		__ret = snprintf(var, size, format, ##args);		\
> +		__ret < 0 || (size_t)__ret >= __size;			\
> +	})

How about adding a comment that explains the meaning of the returned
value? Otherwise this patch looks fine to me. Thank you for having done
this rework.

Bart.

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux