Re: [PATCH] clone: Make use of the strip_suffix() helper method
On Thu, Jul 9, 2015 at 7:00 PM, Jeff King <peff@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:
> 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