Module Name:    src
Committed By:   rillig
Date:           Fri Aug  5 20:59:54 UTC 2022

Modified Files:
        src/usr.bin/make: var.c

Log Message:
make: when parsing ':D' or ':U', only copy text if necessary

When parsing the expression ${:D any ${uninterpreted} text}, parsing of
the ':D' modifier only needs to skip to the next delimiter, there is no
need to keep record of the text that has been skipped.  In this
particular example, there had been an unnecessary memory allocation
since the nested expression was not copied to the result buffer.  Due to
that, the resulting buffer contained " any  text", which was not a
substring of the text passed to the parser, thereby forcing the memory
allocation.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.1026 -r1.1027 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Reply via email to