From a7d390b334f4a3a3a541649771a0547e7fa33ada Mon Sep 17 00:00:00 2001 From: Stephane Letz Date: Wed, 25 Jul 2012 07:29:22 +0200 Subject: [PATCH] jack_server_control patch + getopt_long usage fix. --- example-clients/metro.c | 2 +- example-clients/netmaster.c | 2 +- example-clients/server_control.cpp | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/example-clients/metro.c b/example-clients/metro.c index 6274ce22..1742a599 100644 --- a/example-clients/metro.c +++ b/example-clients/metro.c @@ -154,7 +154,7 @@ main (int argc, char *argv[]) {0, 0, 0, 0} }; - while ((opt = getopt_long (argc, argv, options, long_options, &option_index)) != EOF) { + while ((opt = getopt_long (argc, argv, options, long_options, &option_index)) != -1) { switch (opt) { case 'f': if ((freq = atoi (optarg)) <= 0) { diff --git a/example-clients/netmaster.c b/example-clients/netmaster.c index 6128ef27..e1d14a86 100644 --- a/example-clients/netmaster.c +++ b/example-clients/netmaster.c @@ -73,7 +73,7 @@ main (int argc, char *argv[]) {0, 0, 0, 0} }; - while ((opt = getopt_long (argc, argv, options, long_options, &option_index)) != EOF) { + while ((opt = getopt_long (argc, argv, options, long_options, &option_index)) != -1) { switch (opt) { diff --git a/example-clients/server_control.cpp b/example-clients/server_control.cpp index a03e0e26..7b7f57bc 100644 --- a/example-clients/server_control.cpp +++ b/example-clients/server_control.cpp @@ -153,9 +153,10 @@ int main(int argc, char *argv[]) struct option long_options[] = { {"driver", 1, 0, 'd'}, {"client", 1, 0, 'c'}, + {0, 0, 0, 0} }; - while ((opt = getopt_long (argc, argv, options, long_options, &option_index)) != EOF) { + while ((opt = getopt_long (argc, argv, options, long_options, &option_index)) != -1) { switch (opt) { case 'd': driver_name = optarg;