diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-10-31 13:03:48 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-10-31 13:03:48 +0100 |
commit | 7e3cf5f461eb4fbb7581672bf0835da07c378136 (patch) | |
tree | bdc3874b7894242b095b892f1ed3e81a4d4f06c0 /src/arm | |
parent | 01b480d6d026e0c537dc284a7e7df2c0320a3528 (diff) | |
download | gnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.tar.gz gnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.zip |
tighten formatting rules
Diffstat (limited to 'src/arm')
-rw-r--r-- | src/arm/arm_api.c | 9 | ||||
-rw-r--r-- | src/arm/gnunet-arm.c | 1 | ||||
-rw-r--r-- | src/arm/gnunet-service-arm.c | 6 | ||||
-rw-r--r-- | src/arm/mockup-service.c | 3 | ||||
-rw-r--r-- | src/arm/test_arm_api.c | 4 | ||||
-rw-r--r-- | src/arm/test_exponential_backoff.c | 1 | ||||
-rw-r--r-- | src/arm/test_gnunet_service_arm.c | 1 |
7 files changed, 15 insertions, 10 deletions
diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c index da7268f67..4c6ce3240 100644 --- a/src/arm/arm_api.c +++ b/src/arm/arm_api.c | |||
@@ -288,8 +288,7 @@ handle_arm_result (void *cls, | |||
288 | wait for the result message, but also wait for the service to close | 288 | wait for the result message, but also wait for the service to close |
289 | the connection (and then we have to close our client handle as well); | 289 | the connection (and then we have to close our client handle as well); |
290 | this is done by installing a different receive handler, waiting for | 290 | this is done by installing a different receive handler, waiting for |
291 | the connection to go down */ | 291 | the connection to go down */if (NULL != h->thm) |
292 | if (NULL != h->thm) | ||
293 | { | 292 | { |
294 | GNUNET_break (0); | 293 | GNUNET_break (0); |
295 | op->result_cont (h->thm->cont_cls, | 294 | op->result_cont (h->thm->cont_cls, |
@@ -956,8 +955,7 @@ GNUNET_ARM_request_service_start (struct GNUNET_ARM_Handle *h, | |||
956 | * 2) We're not connected to ARM. | 955 | * 2) We're not connected to ARM. |
957 | * Cancel any reconnection attempts temporarily, then perform | 956 | * Cancel any reconnection attempts temporarily, then perform |
958 | * a service test. | 957 | * a service test. |
959 | */ | 958 | */if (GNUNET_YES == h->currently_up) |
960 | if (GNUNET_YES == h->currently_up) | ||
961 | { | 959 | { |
962 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 960 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
963 | "ARM is already running\n"); | 961 | "ARM is already running\n"); |
@@ -976,8 +974,7 @@ GNUNET_ARM_request_service_start (struct GNUNET_ARM_Handle *h, | |||
976 | yet complete the MQ handshake. However, given that users | 974 | yet complete the MQ handshake. However, given that users |
977 | are unlikely to hammer 'gnunet-arm -s' on a busy system, | 975 | are unlikely to hammer 'gnunet-arm -s' on a busy system, |
978 | the above check should catch 99.99% of the cases where ARM | 976 | the above check should catch 99.99% of the cases where ARM |
979 | is already running. */ | 977 | is already running. */LOG (GNUNET_ERROR_TYPE_DEBUG, |
980 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
981 | "Starting ARM service\n"); | 978 | "Starting ARM service\n"); |
982 | if (NULL == (sig = GNUNET_DISK_pipe (GNUNET_NO, | 979 | if (NULL == (sig = GNUNET_DISK_pipe (GNUNET_NO, |
983 | GNUNET_NO, | 980 | GNUNET_NO, |
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c index 0fdb66fa0..3b4e770b0 100644 --- a/src/arm/gnunet-arm.c +++ b/src/arm/gnunet-arm.c | |||
@@ -1061,4 +1061,5 @@ main (int argc, char *const *argv) | |||
1061 | return lret; | 1061 | return lret; |
1062 | } | 1062 | } |
1063 | 1063 | ||
1064 | |||
1064 | /* end of gnunet-arm.c */ | 1065 | /* end of gnunet-arm.c */ |
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index d13be6eb1..6b6264757 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c | |||
@@ -1335,6 +1335,7 @@ pool_write (char *pool_start, size_t pool_size, size_t *pool_pos, char *str) | |||
1335 | return GNUNET_OK; | 1335 | return GNUNET_OK; |
1336 | } | 1336 | } |
1337 | 1337 | ||
1338 | |||
1338 | /** | 1339 | /** |
1339 | * Handle LIST-message. | 1340 | * Handle LIST-message. |
1340 | * | 1341 | * |
@@ -2193,12 +2194,15 @@ main (int argc, char *const *argv) | |||
2193 | /** | 2194 | /** |
2194 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. | 2195 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. |
2195 | */ | 2196 | */ |
2196 | void __attribute__ ((constructor)) GNUNET_ARM_memory_init () | 2197 | void __attribute__ ((constructor)) |
2198 | GNUNET_ARM_memory_init () | ||
2197 | { | 2199 | { |
2198 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); | 2200 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); |
2199 | mallopt (M_TOP_PAD, 1 * 1024); | 2201 | mallopt (M_TOP_PAD, 1 * 1024); |
2200 | malloc_trim (0); | 2202 | malloc_trim (0); |
2201 | } | 2203 | } |
2204 | |||
2205 | |||
2202 | #endif | 2206 | #endif |
2203 | 2207 | ||
2204 | 2208 | ||
diff --git a/src/arm/mockup-service.c b/src/arm/mockup-service.c index 9870afea1..43dd3c92b 100644 --- a/src/arm/mockup-service.c +++ b/src/arm/mockup-service.c | |||
@@ -116,7 +116,8 @@ GNUNET_SERVICE_MAIN ("do-nothing", | |||
116 | /** | 116 | /** |
117 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. | 117 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. |
118 | */ | 118 | */ |
119 | void __attribute__ ((destructor)) GNUNET_mockup_done () | 119 | void __attribute__ ((destructor)) |
120 | GNUNET_mockup_done () | ||
120 | { | 121 | { |
121 | _exit (special_ret); | 122 | _exit (special_ret); |
122 | } | 123 | } |
diff --git a/src/arm/test_arm_api.c b/src/arm/test_arm_api.c index 5a06c823c..56a0abbd2 100644 --- a/src/arm/test_arm_api.c +++ b/src/arm/test_arm_api.c | |||
@@ -184,8 +184,7 @@ arm_start_cb (void *cls, | |||
184 | * ("sent", because it isn't going anywhere, ARM API starts ARM service | 184 | * ("sent", because it isn't going anywhere, ARM API starts ARM service |
185 | * by itself). | 185 | * by itself). |
186 | * ARM API should report that ARM service is starting. | 186 | * ARM API should report that ARM service is starting. |
187 | */ | 187 | */GNUNET_break (status == GNUNET_ARM_REQUEST_SENT_OK); |
188 | GNUNET_break (status == GNUNET_ARM_REQUEST_SENT_OK); | ||
189 | GNUNET_break (phase == 0); | 188 | GNUNET_break (phase == 0); |
190 | LOG ("Sent 'START' request for arm to ARM %s\n", | 189 | LOG ("Sent 'START' request for arm to ARM %s\n", |
191 | (status == GNUNET_ARM_REQUEST_SENT_OK) ? "successfully" : | 190 | (status == GNUNET_ARM_REQUEST_SENT_OK) ? "successfully" : |
@@ -255,4 +254,5 @@ main (int argc, char *argvx[]) | |||
255 | return ok; | 254 | return ok; |
256 | } | 255 | } |
257 | 256 | ||
257 | |||
258 | /* end of test_arm_api.c */ | 258 | /* end of test_arm_api.c */ |
diff --git a/src/arm/test_exponential_backoff.c b/src/arm/test_exponential_backoff.c index 5d1863f37..e3eed8568 100644 --- a/src/arm/test_exponential_backoff.c +++ b/src/arm/test_exponential_backoff.c | |||
@@ -412,4 +412,5 @@ main (int argc, char *argv[]) | |||
412 | return ret; | 412 | return ret; |
413 | } | 413 | } |
414 | 414 | ||
415 | |||
415 | /* end of test_exponential_backoff.c */ | 416 | /* end of test_exponential_backoff.c */ |
diff --git a/src/arm/test_gnunet_service_arm.c b/src/arm/test_gnunet_service_arm.c index 45053a41d..90fb8bfa0 100644 --- a/src/arm/test_gnunet_service_arm.c +++ b/src/arm/test_gnunet_service_arm.c | |||
@@ -263,4 +263,5 @@ main (int argc, char *av[]) | |||
263 | return ret; | 263 | return ret; |
264 | } | 264 | } |
265 | 265 | ||
266 | |||
266 | /* end of test_gnunet_service_arm.c */ | 267 | /* end of test_gnunet_service_arm.c */ |