summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorLines
2018-11-19fix regression in access to optopt objectRich Felker-0/+1
commit b9410061e2ad6fe91bb3910c3adc7d4a315b7ce9 inadvertently omitted optopt from the "dynamic list", causing it to be split into separate objects that don't share their value if the main program contains a copy relocation for it (for non-PIE executables that access it, and some PIE ones, depending on arch and toolchain versions/options).
2018-11-08optimize two-way strstr and memmem bad character shiftRich Felker-2/+2
first, the condition (mem && k < p) is redundant, because mem being nonzero implies the needle is periodic with period exactly p, in which case any byte that appears in the needle must appear in the last p bytes of the needle, bounding the shift (k) by p. second, the whole point of replacing the shift k by mem (=l-p) is to prevent shifting by less than mem when discarding the memory on shift, in which case linear time could not be guaranteed. but as written, the check also replaced shifts greater than mem by mem, reducing the benefit of the shift. there is no possible benefit to this reduction of the shift; since mem is being cleared, the full shift is valid and more optimal. so only replace the shift by mem when it would be less than mem.
2018-11-02fix regression in setlocale for LC_ALL with per-category settingRich Felker-1/+1
commit d88e5dfa8b989dafff4b748bfb3cba3512c8482e inadvertently changed the argument pased to __get_locale from part (the current ;-delimited component) to name (the full string).