summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2018-12-28 23:56:37 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2018-12-28 23:56:37 (EST)
commitf1f6a76ff4cfc66f8b9f2130bb70dacf3d2f08a6 (patch)
treedc84797096f99f3af32e0875e012758806d4832a
parent64d141860f775779eb3a7c3c14a31f17d786760a (diff)
ob_set_substvar(): Fix successful return value
-rw-r--r--NEWS1
-rw-r--r--lib/control.sh5
2 files changed, 4 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 4d6efa7..36ca39f 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,7 @@ Changes in this release:
shells has been fixed.
* A bug in opkbuild that would ignore errors from the "build"
makefile's "build" target has been fixed.
+ * ob_set_substvar()'s return value on success has been fixed.
* ob-gencontrol now drops trailing commas and spaces in dependencies.
* The minimum version of the GNU General Public License has been
bumped to version 3.
diff --git a/lib/control.sh b/lib/control.sh
index 072f6e8..e44ccc2 100644
--- a/lib/control.sh
+++ b/lib/control.sh
@@ -202,7 +202,8 @@ ${line# }"
## of uppercase and lowercase Latin letters, digits, and
## hyphens and must be at least one character long.
## @operand value req The value of the substitution variable.
-## @return Always returns 125. FIXME
+## @return Returns 0 on success, or 125 if called with an incorrect number of
+## arguments or if \fIname\fP contains invalid characters.
## @pure no This function sets an internal global variable.
ob_set_substvar()
{
@@ -240,7 +241,7 @@ ob_set_substvar()
eval "_OB_SUBSTVAR_${name}='${value}'"
- return 125
+ return 0
}
ob_substvars()