On Sun, Oct 01, 2017 at 04:54:14PM +0200, René Scharfe wrote: > This is shorter, easier and makes the intent clearer. > > Patch generated with Coccinelle and contrib/coccinelle/strbuf.cocci. Technically this behaves differently if there is a NUL embedded in the string. I'd expect that to be unlikely in most cases. And when it is possible, I'd venture to say that the new behavior is likely to be the correct one. This case is fine (and any embedded NUL would be cut off by setenv anyway). As a general transformation, this is not as obviously safe as many of the others. But since we eyeball the output of coccinelle anyway, it should be fine (and any code which is _relying_ on that behavior really ought to be rewritten in a less subtle way). -Peff