diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-03-15 15:28:41 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-03-15 15:28:41 +0100 |
commit | 5d6ed5fbda01a324d8d9b800928339d4a90343c3 (patch) | |
tree | b52f65dfc01e42f989df7aa2569ae69695fd9a54 /src/testbed/generate-underlay-topology.c | |
parent | 294393abdca9f482321696e9aaec64b1a0488607 (diff) | |
download | gnunet-5d6ed5fbda01a324d8d9b800928339d4a90343c3.tar.gz gnunet-5d6ed5fbda01a324d8d9b800928339d4a90343c3.zip |
Still porting to new getopt API.
Diffstat (limited to 'src/testbed/generate-underlay-topology.c')
-rw-r--r-- | src/testbed/generate-underlay-topology.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/testbed/generate-underlay-topology.c b/src/testbed/generate-underlay-topology.c index 36580a2a3..ab7d81c8b 100644 --- a/src/testbed/generate-underlay-topology.c +++ b/src/testbed/generate-underlay-topology.c | |||
@@ -70,7 +70,7 @@ enum GNUNET_TESTBED_TopologyOption topology; | |||
70 | /** | 70 | /** |
71 | * The number of peers to include in the topology | 71 | * The number of peers to include in the topology |
72 | */ | 72 | */ |
73 | static int num_peers; | 73 | static unsigned int num_peers; |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * program result | 76 | * program result |
@@ -335,11 +335,15 @@ int | |||
335 | main (int argc, char *const argv[]) | 335 | main (int argc, char *const argv[]) |
336 | { | 336 | { |
337 | struct GNUNET_GETOPT_CommandLineOption option[] = { | 337 | struct GNUNET_GETOPT_CommandLineOption option[] = { |
338 | {'p', "num-peers", "COUNT", | 338 | |
339 | gettext_noop ("create COUNT number of peers"), | 339 | GNUNET_GETOPT_OPTION_SET_UINT ('p', |
340 | GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_peers}, | 340 | "num-peers", |
341 | "COUNT", | ||
342 | gettext_noop ("create COUNT number of peers"), | ||
343 | &num_peers), | ||
341 | GNUNET_GETOPT_OPTION_END | 344 | GNUNET_GETOPT_OPTION_END |
342 | }; | 345 | }; |
346 | |||
343 | int ret; | 347 | int ret; |
344 | 348 | ||
345 | exit_result = GNUNET_SYSERR; | 349 | exit_result = GNUNET_SYSERR; |