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
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to