SC2155: Declare and assign separately to avoid masking return values.

In the original code, the return value of mycmd is ignored, and export
will instead always return true. This may prevent conditionals, set -e
and traps from working correctly.

PR:		227109
Submitted by:	mat
Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2018-06-01 16:20:51 +00:00
parent ccbfedd88c
commit 473030b0ea
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=471273

View file

@ -276,7 +276,8 @@ conserve_old_patches() {
}
install_regenerated_patches() {
local testdir=$(find ${DESTDIR} -empty)
local testdir
testdir=$(find ${DESTDIR} -empty)
if [ -z "${testdir}" ]; then
mkdir -p ${PATCHDIR}
find ${DESTDIR} -type f -exec mv {} ${PATCHDIR}/ \;