Re: [PATCH] don't record empty IFS scan regions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22/03/2018 03:40, Martijn Dekker wrote:
evalvar() records empty expansion results (varlen == 0) as string
regions that need to be scanned for IFS characters. This is pointless,
because there is nothing to split.

varlen may be set to -1 when an unset variable is expanded. If it's beneficial to avoid recording empty regions to scan for IFS characters, should those also be excluded?

This patch fixes the bug that, given no positional parameters, unquoted
$@ and $* incorrectly generate one empty field (they should generate no
fields). Apparently that was a side effect of the above.

This seems weird though. If you want to remove the recording of empty regions because they are pointless, then how does removing them fix a bug? Doesn't this show that empty regions do have an effect? Perhaps they're not supposed to have any effect, perhaps it's a specific combination of empty regions and something else that triggers some bug, and perhaps that combination can no longer occur with your patch.

Cheers,
Harald van Dijk
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux