From: Sebastian Schuberth Date: Thu, 09 Jul 2015 17:16:33 GMT Subject: Re: [PATCH] clone: Make use of the strip_suffix() helper method Message-ID: In-Reply-To: <20150709170054.GA15820@peff.net> On Thu, Jul 9, 2015 at 7:00 PM, Jeff King 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