HomeFreeBSD

Simplify redundant malloc'ing in sed -e.

Description

Simplify redundant malloc'ing in sed -e.

When encountering an -e argument, sed currently mallocs a string to COPY
the optarg -- with '\n' appended. The appendage does not seem necessary --
indeed, the same call to add_compunit processing the sole command (given
without -e) passes the *argv verbatim: without making a copy, and without
appending newline.

This matches what is done in other BSDs.

Submitted by: Mikhail T.
PR: 195929
MFC after: 2 weeks

Details

Provenance
pfgAuthored on
Parents
rS299278: [bhnd] fix incorrect typing.
Branches
Unknown
Tags
Unknown