On Thu, Jul 9, 2015 at 7:00 PM, Jeff King <p...@peff.net> wrote:

> If you wanted to get really fancy, I think you could put a ternary
> operator in the middle of the strip_suffix call. That makes it clear
> that "len" is set in all code paths, but I think some people find
> ternary operators unreadable. :)

I like the idea about the ternary operator, will do.

> This one can also be simplified using xstrfmt to:

Nice, will also do.

> Do we still need to cast "len" to an int to use it with "%.*" (it is
> defined by the standard as an int, not a size_t)?

I think we're more on the safe side by keeping the cast, so I'll do that, too.

-- 
Sebastian Schuberth
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to