common: Properly forward arguments from die to error

Also allow this function to be called without arguments, in which case,
don't call error at all. Some uses of this function wrongly assumed
that this was already allowed.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
This commit is contained in:
Dave Reisner 2013-07-30 11:00:54 -04:00 committed by Pierre Schmitz
parent 29e62278a7
commit fb30cabe61
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ trap_exit() {
}
die() {
error "$*"
(( $# )) && error "$@"
cleanup 1
}