From a343bb1d182ec1141fb45f26dfe1858623428db2 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 05 Jan 2019 11:07:20 -0500 Subject: ob_parse_control(): Replace [ commands after callbacks --- (limited to 'lib') diff --git a/lib/control.sh b/lib/control.sh index 234a375..524c504 100644 --- a/lib/control.sh +++ b/lib/control.sh @@ -120,8 +120,7 @@ ob_parse_control() ;; [!\ ]*':'*) # "Name: Value" line. if [ -n "${name}" ]; then - "${field_cb}" "${name}" "${value}" "${user_data}" - if [ ${?} -ne 0 ]; then + if ! "${field_cb}" "${name}" "${value}" "${user_data}"; then return 0 fi fi @@ -172,8 +171,7 @@ ${line# }" EOF if [ -n "${name}" ]; then - "${field_cb}" "${name}" "${value}" "${user_data}" - if [ ${?} -ne 0 ]; then + if ! "${field_cb}" "${name}" "${value}" "${user_data}"; then return 0 fi fi -- cgit v0.9.1