]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r276218:
authorpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 8 Jan 2015 03:44:54 +0000 (03:44 +0000)
committerpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 8 Jan 2015 03:44:54 +0000 (03:44 +0000)
commit32f7617809e374ba658dbc194f5b8cd7bc3c898c
tree06c7c420992f2695435faf93bddd7a6d96eab161
parentf0807262fc6a83ec2f051ac676a886ff9d8ce43b
MFC r276218:

patch: Bring in xstrdup and use it when appropriate.

The function savestr allows NULL return values during Plan A patching so in
case of out of memory conditions, Plan B can step in.  In many cases, NULL
value is not properly handled, so use xstrdup here (it's outside Plan A/B
patching, which means that even Plan B relies on successful operations).

Clean up some whitespaces while here

Obtained from: OpenBSD

git-svn-id: svn://svn.freebsd.org/base/stable/10@276807 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.bin/patch/patch.c
usr.bin/patch/pch.c
usr.bin/patch/util.c
usr.bin/patch/util.h