https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195929

            Bug ID: 195929
           Summary: usr.bin/sed -- eliminate one malloc and add consts
           Product: Base System
           Version: 10.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: m...@aldan.algebra.com

Created attachment 150515
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=150515&action=edit
Process -e optarg verbatim

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.

The patch eliminates the seemingly redundant malloc/string-copying.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to