On Fri, Sep 01, 2017 at 03:13:20PM +0000, Bart Van Assche wrote: > > #define check_snprintf(buf, len, fmt, ...) \ > > __good_snprintf(len, snprintf(buf, len, fmt, ##__VA_ARGS__)) > > If an inline function will be introduced anyway, why not to make check_snprintf() > itself an inline function and use vsnprintf() instead of snprintf()? Well.. Generally speaking I prefer to avoid wrappering 'magic' functions like snprintf with inlines because you loose the 'magic'. eg, however it is done, modern gcc triggers -Wformat-length analysis for snprintf, and if you wrapper it with an inline it appears that analysis is lost. This is separate from the well known attribute((printf)). Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html