commit 5479efa311e253b2577591082b46adb485b55baa
parent 4db98445049fb99a9d2bd5c9317317731c2a5a59
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date: Fri, 17 Mar 2017 14:47:49 +0100
Porting to new getopt API.
Diffstat:
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c
@@ -1128,10 +1128,13 @@ run (void *cls,
int
main (int argc, char *const *argv)
{
- static const struct GNUNET_GETOPT_CommandLineOption options[] = {
- { 'C', "connection-close", NULL,
- "force HTTP connections to be closed after each request", 0,
- &GNUNET_GETOPT_set_one, &TMH_merchant_connection_close},
+ struct GNUNET_GETOPT_CommandLineOption options[] = {
+
+ GNUNET_GETOPT_OPTION_SET_ONE ('C',
+ "connection-close",
+ "force HTTP connections to be closed after each request",
+ &TMH_merchant_connection_close),
+
GNUNET_GETOPT_OPTION_END
};
diff --git a/src/merchant-tools/taler-merchant-dbinit.c b/src/merchant-tools/taler-merchant-dbinit.c
@@ -87,10 +87,13 @@ int
main (int argc,
char *const *argv)
{
- const struct GNUNET_GETOPT_CommandLineOption options[] = {
- {'r', "reset", NULL,
- "reset database (DANGEROUS: all existing data is lost!)", 0,
- &GNUNET_GETOPT_set_one, &reset_db},
+ struct GNUNET_GETOPT_CommandLineOption options[] = {
+
+ GNUNET_GETOPT_OPTION_SET_ONE ('r',
+ "reset",
+ "reset database (DANGEROUS: all existing data is lost!)",
+ &reset_db),
+
GNUNET_GETOPT_OPTION_END
};