OpenBSD CVS

CVS log for src/usr.bin/tr/str.c


[BACK] Up to [local] / src / usr.bin / tr

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: OPENBSD_7_2_BASE


Revision 1.14 / (download) - annotate - [select for diffs], Tue Nov 2 03:09:15 2021 UTC (2 years, 7 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.13: +25 -11 lines
Diff to previous 1.13 (colored)

tr(1): plug leak in genclass()

If we have already generated a given character class we don't need to
do it again.  We can also return some of the memory we allocated for
the class.  NCHARS is an upper bound, most character classes are
small.

This fixes a small leak in genclass().

While here, switch to an ANSI function definition.

Thread: https://marc.info/?l=openbsd-tech&m=163571942030440&w=2

ok millert@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.