summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/.clang-tidy1
-rw-r--r--test/test_state.c18
2 files changed, 11 insertions, 8 deletions
diff --git a/test/.clang-tidy b/test/.clang-tidy
index 4ef27ee..aab3384 100644
--- a/test/.clang-tidy
+++ b/test/.clang-tidy
@@ -2,7 +2,6 @@
# SPDX-License-Identifier: 0BSD OR ISC
Checks: >
- -*-else-after-return,
-*-magic-numbers,
-android-cloexec-fopen,
-bugprone-branch-clone,
diff --git a/test/test_state.c b/test/test_state.c
index 798fb6e..cb84fb4 100644
--- a/test/test_state.c
+++ b/test/test_state.c
@@ -182,20 +182,24 @@ get_port_value(const char* port_symbol,
*size = sizeof(float);
*type = ctx->atom_Float;
return &ctx->in;
- } else if (!strcmp(port_symbol, "output")) {
+ }
+
+ if (!strcmp(port_symbol, "output")) {
*size = sizeof(float);
*type = ctx->atom_Float;
return &ctx->out;
- } else if (!strcmp(port_symbol, "control")) {
+ }
+
+ if (!strcmp(port_symbol, "control")) {
*size = sizeof(float);
*type = ctx->atom_Float;
return &ctx->control;
- } else {
- fprintf(
- stderr, "error: get_port_value for nonexistent port `%s'\n", port_symbol);
- *size = *type = 0;
- return NULL;
}
+
+ fprintf(
+ stderr, "error: get_port_value for nonexistent port `%s'\n", port_symbol);
+ *size = *type = 0;
+ return NULL;
}
static void