summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Ørsted Andresen <bo.andresen@zlin.dk>2007-03-20 11:08:46 +0000
committerBo Ørsted Andresen <bo.andresen@zlin.dk>2007-03-20 11:08:46 +0000
commit662cf702e6afc82f5a548e4e6e651454b2937a51 (patch)
tree8624047d2becde8473b9a97f8bb57411467d2a0a
parent2e77ac2ac3d9d9ee707522669aab8d8fbb6b2b4f (diff)
downloadwgetpaste-662cf702e6afc82f5a548e4e6e651454b2937a51.tar.gz
Don't evaluate more than necessary in warn_size().
-rwxr-xr-xwgetpaste4
1 files changed, 2 insertions, 2 deletions
diff --git a/wgetpaste b/wgetpaste
index 69f031a..7455109 100755
--- a/wgetpaste
+++ b/wgetpaste
@@ -242,8 +242,8 @@ warn_size() {
echo "error output from wget if it fails. Alternatively use another pastebin service like e.g. sh."
fi
}
- local LIMIT=("$(eval "echo \"\${${ENGINE}_WARNS[0]}\"") ""$(eval "echo \"\${${ENGINE}_WARNS[1]}\"")")
- [[ "${LIMIT}" != " " ]] && warn "${LIMIT[@]}"
+ local LIMIT="$(eval "echo \"\${${ENGINE}_WARNS[0]}\"")"
+ [[ -n "${LIMIT}" ]] && warn "${LIMIT}" "$(eval "echo \"\${${ENGINE}_WARNS[1]}\"")"
}
post_data() {