summaryrefslogtreecommitdiff
path: root/src/nse/gnunet-nse.c
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-09-08 12:33:09 +0000
committerng0 <ng0@n0.is>2019-09-08 12:33:09 +0000
commitd41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb (patch)
tree9efd18ea7d425652085ed0bd5e8e45604bc5f6b9 /src/nse/gnunet-nse.c
parenta0fce305c565c0937d917a92712f15e9c5736260 (diff)
uncrustify as demanded.
Diffstat (limited to 'src/nse/gnunet-nse.c')
-rw-r--r--src/nse/gnunet-nse.c77
1 files changed, 39 insertions, 38 deletions
diff --git a/src/nse/gnunet-nse.c b/src/nse/gnunet-nse.c
index 73b80e28b..3735373b5 100644
--- a/src/nse/gnunet-nse.c
+++ b/src/nse/gnunet-nse.c
@@ -11,12 +11,12 @@
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
SPDX-License-Identifier: AGPL3.0-or-later
-*/
+ */
/**
* @file nse/gnunet-nse.c
@@ -44,14 +44,14 @@ static int status;
* @param cls NULL
*/
static void
-do_shutdown (void *cls)
+do_shutdown(void *cls)
{
- (void) cls;
+ (void)cls;
if (NULL != nse)
- {
- GNUNET_NSE_disconnect (nse);
- nse = NULL;
- }
+ {
+ GNUNET_NSE_disconnect(nse);
+ nse = NULL;
+ }
}
@@ -65,19 +65,19 @@ do_shutdown (void *cls)
* of the size estimation values seen
*/
static void
-handle_estimate (void *cls,
- struct GNUNET_TIME_Absolute timestamp,
- double estimate,
- double std_dev)
+handle_estimate(void *cls,
+ struct GNUNET_TIME_Absolute timestamp,
+ double estimate,
+ double std_dev)
{
- (void) cls;
+ (void)cls;
status = 0;
- fprintf (stdout,
- "%llu %f %f %f\n",
- (unsigned long long) timestamp.abs_value_us,
- GNUNET_NSE_log_estimate_to_n (estimate),
- estimate,
- std_dev);
+ fprintf(stdout,
+ "%llu %f %f %f\n",
+ (unsigned long long)timestamp.abs_value_us,
+ GNUNET_NSE_log_estimate_to_n(estimate),
+ estimate,
+ std_dev);
}
@@ -90,16 +90,16 @@ handle_estimate (void *cls,
* @param cfg configuration handle
*/
static void
-run (void *cls,
- char *const *args,
- const char *cfgfile,
- const struct GNUNET_CONFIGURATION_Handle *cfg)
+run(void *cls,
+ char *const *args,
+ const char *cfgfile,
+ const struct GNUNET_CONFIGURATION_Handle *cfg)
{
- (void) cls;
- (void) args;
- (void) cfgfile;
- nse = GNUNET_NSE_connect (cfg, &handle_estimate, NULL);
- GNUNET_SCHEDULER_add_shutdown (&do_shutdown, NULL);
+ (void)cls;
+ (void)args;
+ (void)cfgfile;
+ nse = GNUNET_NSE_connect(cfg, &handle_estimate, NULL);
+ GNUNET_SCHEDULER_add_shutdown(&do_shutdown, NULL);
}
@@ -109,21 +109,22 @@ run (void *cls,
* @return 0 on success
*/
int
-main (int argc, char *const *argv)
+main(int argc, char *const *argv)
{
static struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_END};
+ GNUNET_GETOPT_OPTION_END
+ };
status = 1;
if (GNUNET_OK !=
- GNUNET_PROGRAM_run (argc,
- argv,
- "gnunet-nse",
- gettext_noop (
- "Show network size estimates from NSE service."),
- options,
- &run,
- NULL))
+ GNUNET_PROGRAM_run(argc,
+ argv,
+ "gnunet-nse",
+ gettext_noop(
+ "Show network size estimates from NSE service."),
+ options,
+ &run,
+ NULL))
return 2;
return status;
}