--- var.c 2001/11/19 16:07:15 1.25
+++ var.c 2001/11/19 16:30:18 1.26
@@ -523,24 +523,24 @@
rc = varname(p, end, nameclass);
if (rc < 0)
goto error_return;
- else if (rc > 0) {
+ if (rc > 0) {
if (!tokenbuf_append(&name, p, rc)) {
rc = VAR_ERR_OUT_OF_MEMORY;
goto error_return;
- } else
- p += rc;
+ }
+ p += rc;
}
rc = variable(p, end, config, nameclass, lookup, lookup_context,
force_expand, &tmp);
if (rc < 0)
goto error_return;
- else if (rc > 0) {
+ if (rc > 0) {
if (!tokenbuf_append(&name, tmp.begin, tmp.end - tmp.begin)) {
rc = VAR_ERR_OUT_OF_MEMORY;
goto error_return;
- } else
- p += rc;
+ }
+ p += rc;
}
}
while (rc > 0);
@@ -559,8 +559,8 @@
if (p == end || (*p != config->enddelim && *p != ':')) {
rc = VAR_ERR_INCOMPLETE_VARIABLE_SPEC;
goto error_return;
- } else
- ++p;
+ }
+ ++p;
/* Use the lookup callback to get the variable's contents. */
@@ -568,22 +568,21 @@
&data, &len, &buffer_size);
if (rc < 0)
goto error_return;
- else if (rc == 0) {
+ if (rc == 0) {
/* The variable is undefined. What we'll do now depends on the
force_expand flag. */
if (force_expand) {
rc = VAR_ERR_UNDEFINED_VARIABLE;
goto error_return;
- } else {
- /* Initialize result to point back to the original text in
- the buffer. */
-
- result->begin = begin - 1;
- result->end = p;
- result->buffer_size = 0;
- failed = 1;
}
+ /* Initialize result to point back to the original text in
+ the buffer. */
+
+ result->begin = begin - 1;
+ result->end = p;
+ result->buffer_size = 0;
+ failed = 1;
} else {
/* The preliminary result is the contents of the variable.
This may be modified by the commands that may follow. */
|