diff options
Diffstat (limited to 'src/testbed/test_testbed_api_sd.c')
-rw-r--r-- | src/testbed/test_testbed_api_sd.c | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/src/testbed/test_testbed_api_sd.c b/src/testbed/test_testbed_api_sd.c index 1a7b4adbd..81b8dba41 100644 --- a/src/testbed/test_testbed_api_sd.c +++ b/src/testbed/test_testbed_api_sd.c | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -43,47 +43,47 @@ static int ret; | |||
43 | * @param cfg the configuration file handle | 43 | * @param cfg the configuration file handle |
44 | */ | 44 | */ |
45 | static void | 45 | static void |
46 | run (void *cls, char *const *args, const char *cfgfile, | 46 | run(void *cls, char *const *args, const char *cfgfile, |
47 | const struct GNUNET_CONFIGURATION_Handle *config) | 47 | const struct GNUNET_CONFIGURATION_Handle *config) |
48 | { | 48 | { |
49 | struct SDHandle *h = GNUNET_TESTBED_SD_init_ (20); | 49 | struct SDHandle *h = GNUNET_TESTBED_SD_init_(20); |
50 | int sd; | 50 | int sd; |
51 | 51 | ||
52 | ret = 0; | 52 | ret = 0; |
53 | GNUNET_TESTBED_SD_add_data_ (h, 40); | 53 | GNUNET_TESTBED_SD_add_data_(h, 40); |
54 | if (GNUNET_SYSERR != GNUNET_TESTBED_SD_deviation_factor_ (h, 10, &sd)) | 54 | if (GNUNET_SYSERR != GNUNET_TESTBED_SD_deviation_factor_(h, 10, &sd)) |
55 | { | 55 | { |
56 | GNUNET_break (0); | 56 | GNUNET_break(0); |
57 | ret = 1; | 57 | ret = 1; |
58 | goto err; | 58 | goto err; |
59 | } | 59 | } |
60 | GNUNET_TESTBED_SD_add_data_ (h, 30); | 60 | GNUNET_TESTBED_SD_add_data_(h, 30); |
61 | if (GNUNET_SYSERR == GNUNET_TESTBED_SD_deviation_factor_ (h, 80, &sd)) | 61 | if (GNUNET_SYSERR == GNUNET_TESTBED_SD_deviation_factor_(h, 80, &sd)) |
62 | { | 62 | { |
63 | GNUNET_break (0); | 63 | GNUNET_break(0); |
64 | ret = 1; | 64 | ret = 1; |
65 | goto err; | 65 | goto err; |
66 | } | 66 | } |
67 | GNUNET_TESTBED_SD_add_data_ (h, 40); | 67 | GNUNET_TESTBED_SD_add_data_(h, 40); |
68 | if ((GNUNET_SYSERR == GNUNET_TESTBED_SD_deviation_factor_ (h, 30, &sd)) | 68 | if ((GNUNET_SYSERR == GNUNET_TESTBED_SD_deviation_factor_(h, 30, &sd)) |
69 | || (-2 != sd)) | 69 | || (-2 != sd)) |
70 | { | 70 | { |
71 | GNUNET_break (0); | 71 | GNUNET_break(0); |
72 | ret = 1; | 72 | ret = 1; |
73 | goto err; | 73 | goto err; |
74 | } | 74 | } |
75 | GNUNET_TESTBED_SD_add_data_ (h, 10); | 75 | GNUNET_TESTBED_SD_add_data_(h, 10); |
76 | GNUNET_TESTBED_SD_add_data_ (h, 30); | 76 | GNUNET_TESTBED_SD_add_data_(h, 30); |
77 | if ((GNUNET_SYSERR == GNUNET_TESTBED_SD_deviation_factor_ (h, 60, &sd)) | 77 | if ((GNUNET_SYSERR == GNUNET_TESTBED_SD_deviation_factor_(h, 60, &sd)) |
78 | || (3 != sd)) | 78 | || (3 != sd)) |
79 | { | 79 | { |
80 | GNUNET_break (0); | 80 | GNUNET_break(0); |
81 | ret = 1; | 81 | ret = 1; |
82 | goto err; | 82 | goto err; |
83 | } | 83 | } |
84 | 84 | ||
85 | err: | 85 | err: |
86 | GNUNET_TESTBED_SD_destroy_ (h); | 86 | GNUNET_TESTBED_SD_destroy_(h); |
87 | } | 87 | } |
88 | 88 | ||
89 | 89 | ||
@@ -91,7 +91,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
91 | * Main function | 91 | * Main function |
92 | */ | 92 | */ |
93 | int | 93 | int |
94 | main (int argc, char **argv) | 94 | main(int argc, char **argv) |
95 | { | 95 | { |
96 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 96 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
97 | GNUNET_GETOPT_OPTION_END | 97 | GNUNET_GETOPT_OPTION_END |
@@ -100,8 +100,8 @@ main (int argc, char **argv) | |||
100 | 100 | ||
101 | result = GNUNET_SYSERR; | 101 | result = GNUNET_SYSERR; |
102 | result = | 102 | result = |
103 | GNUNET_PROGRAM_run (argc, argv, | 103 | GNUNET_PROGRAM_run(argc, argv, |
104 | "test_testbed_api_sd", "nohelp", options, &run, NULL); | 104 | "test_testbed_api_sd", "nohelp", options, &run, NULL); |
105 | if ((GNUNET_OK != result)) | 105 | if ((GNUNET_OK != result)) |
106 | return 1; | 106 | return 1; |
107 | return ret; | 107 | return ret; |