Merge branch 'cboltz-minus-one' into 'master'

replace -1 return codes with 255

Technically "return -1" returns 255, so we should write it that way.
(found by shellcheck)

PR: https://gitlab.com/apparmor/apparmor/merge_requests/256
Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
John Johansen 2018-11-03 14:08:25 +00:00
commit 607e185d0c

View file

@ -243,10 +243,10 @@ failstop_system() {
if [ $level -ne "1" ] ; then
aa_log_failure_msg "- could not start AppArmor. Changing to runlevel 1"
telinit 1;
return -1;
return 255;
fi
aa_log_failure_msg "- could not start AppArmor."
return -1
return 255
}
module_panic() {
@ -259,7 +259,7 @@ module_panic() {
rc=$?
return $rc ;;
*) aa_log_failure_msg "- invalid AppArmor module fail option"
return -1 ;;
return 255 ;;
esac
}