summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-03-14 13:57:21 +0100
committerMax Kellermann <max@musicpd.org>2020-09-07 20:07:03 +0200
commitb4dc2c07d515b5f0360c88b10292788591ae1117 (patch)
treef6a58d205abcd9402dffd197bcadb8936a418ac5 /test
parentd7838950d8866127bab5072532fa6e438728c9c1 (diff)
test/run_filter: move the buffer into the loop
Diffstat (limited to 'test')
-rw-r--r--test/run_filter.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/run_filter.cxx b/test/run_filter.cxx
index 5a70d6828..bcc3ea2af 100644
--- a/test/run_filter.cxx
+++ b/test/run_filter.cxx
@@ -62,8 +62,6 @@ LoadFilter(const ConfigData &config, const char *name)
int main(int argc, char **argv)
try {
- char buffer[4096];
-
if (argc < 3 || argc > 4) {
fprintf(stderr, "Usage: run_filter CONFIG NAME [FORMAT] <IN\n");
return EXIT_FAILURE;
@@ -98,6 +96,8 @@ try {
/* play */
while (true) {
+ char buffer[4096];
+
ssize_t nbytes;
nbytes = read(0, buffer, sizeof(buffer));