Commit 680e0017 authored by Daan Vreeken's avatar Daan Vreeken
Browse files

More de-indenting. Still no functional changes.

	modified:   controller/controller_block.c
parent 5935bba9
......@@ -466,6 +466,7 @@ static int controller_block_resolve_link(struct controller_block_link *link)
}
if (in && out) {
// Try to find the output.
for (i = 0; i < out->outputs; i++) {
if (!strcmp(out->output[i].name, link->outterm)) {
outptr = out->output[i].value.v;
......@@ -479,31 +480,36 @@ static int controller_block_resolve_link(struct controller_block_link *link)
link->outblock, link->outterm);
return -1;
}
// Try to find the input.
for (i = 0; i < in->inputs; i++) {
if (strcmp(in->input[i].name, link->interm) ||
in->input[i].type != outtype)
continue;
link->type = controller_block_term_str(in->input[i].type);
log_send(LOG_T_DEBUG,
"Linking %s.%s to %s.%s%s",
link->outblock, link->outterm,
link->inblock, link->interm,
link->chain ? " (chained)" : "");
*in->input[i].value.v = outptr;
if (link->chain)
in->input[i].otherside = outsource;
else
in->input[i].otherside = NULL;
set_ghost_otherside(&in->input[i],
link->chain ? outsource : NULL, outptr);
return 0;
if ((strcmp(in->input[i].name, link->interm) == 0) &&
(in->input[i].type == outtype))
break;
}
log_send(LOG_T_ERROR,
"Input terminal %s.%s not found",
link->inblock, link->interm);
if (i >= in->inputs) {
log_send(LOG_T_ERROR,
"Input terminal %s.%s not found", link->inblock,
link->interm);
return -1;
}
// Found both. Let's link them..
link->type = controller_block_term_str(in->input[i].type);
log_send(LOG_T_DEBUG,
"Linking %s.%s to %s.%s%s",
link->outblock, link->outterm,
link->inblock, link->interm,
link->chain ? " (chained)" : "");
*in->input[i].value.v = outptr;
if (link->chain)
in->input[i].otherside = outsource;
else
in->input[i].otherside = NULL;
set_ghost_otherside(&in->input[i],
link->chain ? outsource : NULL, outptr);
return 0;
} else {
if (!in) {
log_send(LOG_T_DEBUG,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment