diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2018-06-12 12:06:14 +0200 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2018-06-12 12:06:14 +0200 |
commit | 6f7d5992698d57b4f3b3c079b4392b6dbc5c1b1b (patch) | |
tree | e53484a21d28d15edce9d6f0a1710beb768eae20 | |
parent | f7be081ad266ee9ea11047033599d30b90fb5f32 (diff) | |
download | merchant-6f7d5992698d57b4f3b3c079b4392b6dbc5c1b1b.tar.gz merchant-6f7d5992698d57b4f3b3c079b4392b6dbc5c1b1b.zip |
'enum' instead of several same-typed #define's.
-rw-r--r-- | src/merchant-tools/taler-merchant-generate-payments_new.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/merchant-tools/taler-merchant-generate-payments_new.c b/src/merchant-tools/taler-merchant-generate-payments_new.c index b910d81f..db27b212 100644 --- a/src/merchant-tools/taler-merchant-generate-payments_new.c +++ b/src/merchant-tools/taler-merchant-generate-payments_new.c | |||
@@ -39,12 +39,15 @@ | |||
39 | #include "taler_merchant_testing_lib.h" | 39 | #include "taler_merchant_testing_lib.h" |
40 | 40 | ||
41 | /* Error codes. */ | 41 | /* Error codes. */ |
42 | #define MISSING_MERCHANT_URL 2 | 42 | enum PaymentGeneratorError { |
43 | #define FAILED_TO_LAUNCH_MERCHANT 3 | 43 | |
44 | #define MISSING_BANK_URL 4 | 44 | MISSING_MERCHANT_URL = 2, |
45 | #define FAILED_TO_LAUNCH_BANK 5 | 45 | FAILED_TO_LAUNCH_MERCHANT, |
46 | #define BAD_CLI_ARG 6 | 46 | MISSING_BANK_URL, |
47 | #define BAD_CONFIG_FILE 7 | 47 | FAILED_TO_LAUNCH_BANK, |
48 | BAD_CLI_ARG, | ||
49 | BAD_CONFIG_FILE | ||
50 | }; | ||
48 | 51 | ||
49 | /* Hard-coded params. Note, the bank is expected to | 52 | /* Hard-coded params. Note, the bank is expected to |
50 | * have the Tor user with account number 3 and password 'x'. | 53 | * have the Tor user with account number 3 and password 'x'. |
@@ -483,7 +486,7 @@ terminate_process (struct GNUNET_OS_Process *process) | |||
483 | * | 486 | * |
484 | * @param argc number of arguments from the command line | 487 | * @param argc number of arguments from the command line |
485 | * @param argv command line arguments | 488 | * @param argv command line arguments |
486 | * @return 0 ok, 1 on error | 489 | * @return 0 ok, or `enum PaymentGeneratorError` on error |
487 | */ | 490 | */ |
488 | int | 491 | int |
489 | main (int argc, | 492 | main (int argc, |