Make sure that client code can’t pass in a negative padding by accident.
Suggested-by: Rubén Justo <redacted>
Signed-off-by: Kristoffer Haugsbakk <redacted>
Signed-off-by: Junio C Hamano <redacted>
{
struct column_options nopts;
+ if (opts && (0 > opts->padding))
+ BUG("padding must be non-negative");
if (!list->nr)
return;
assert((colopts & COL_ENABLE_MASK) != COL_AUTO);
{
struct strvec *argv;
+ if (opts && (0 > opts->padding))
+ BUG("padding must be non-negative");
if (fd_out != -1)
return -1;