[PATCH] fix shell bug in ${var%pattern} expansion

David O'Brien obrien at freebsd.org
Wed Oct 13 23:24:12 UTC 2010


On Wed, Oct 13, 2010 at 11:42:48PM +0200, Jilles Tjoelker wrote:
> Style bug:
> > +growstrstackblock(int n) {
> The opening brace should be on its own line.

Indeed.  I'm surprised I did that.  Thank you for catching it.

> Your test is too fragile: it often fails to detect the bug. Calling like
>   sh -c '. expansion/trim4.0'
> gives the correct output even with a buggy sh. I propose something like
> this, or perhaps with an additional string comparison:

I also like this test better.

Thank you for the review.

-- 
-- David  (obrien at FreeBSD.org)


More information about the freebsd-current mailing list