[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: -style fixes
From: |
gnunet |
Subject: |
[gnunet] branch master updated: -style fixes |
Date: |
Wed, 10 Aug 2022 20:58:30 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new e9023bbcf -style fixes
e9023bbcf is described below
commit e9023bbcf93e35bee6e14c9d32b7ac223dcdd48f
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Aug 10 20:58:08 2022 +0200
-style fixes
---
src/curl/curl_reschedule.c | 40 +++-------
src/include/gnunet_configuration_lib.h | 129 +++++++++++++++++----------------
src/util/configuration.c | 2 +-
3 files changed, 77 insertions(+), 94 deletions(-)
diff --git a/src/curl/curl_reschedule.c b/src/curl/curl_reschedule.c
index a1fe55aa5..0c19bd171 100644
--- a/src/curl/curl_reschedule.c
+++ b/src/curl/curl_reschedule.c
@@ -59,12 +59,6 @@ struct GNUNET_CURL_RescheduleContext
};
-/**
- * Initialize reschedule context; with custom response parser
- *
- * @param ctx context to manage
- * @return closure for #GNUNET_CURL_gnunet_scheduler_reschedule().
- */
struct GNUNET_CURL_RescheduleContext *
GNUNET_CURL_gnunet_rc_create_with_parser (struct GNUNET_CURL_Context *ctx,
GNUNET_CURL_RawParser rp,
@@ -93,12 +87,6 @@ clean_result (void *response)
}
-/**
- * Initialize reschedule context.
- *
- * @param ctx context to manage
- * @return closure for #GNUNET_CURL_gnunet_scheduler_reschedule().
- */
struct GNUNET_CURL_RescheduleContext *
GNUNET_CURL_gnunet_rc_create (struct GNUNET_CURL_Context *ctx)
{
@@ -112,11 +100,6 @@ GNUNET_CURL_gnunet_rc_create (struct GNUNET_CURL_Context
*ctx)
}
-/**
- * Destroy reschedule context.
- *
- * @param rc context to destroy
- */
void
GNUNET_CURL_gnunet_rc_destroy (struct GNUNET_CURL_RescheduleContext *rc)
{
@@ -159,13 +142,18 @@ context_task (void *cls)
&timeout);
if (timeout >= 0)
delay =
- GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, timeout);
+ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS,
+ timeout);
else
delay = GNUNET_TIME_UNIT_FOREVER_REL;
rs = GNUNET_NETWORK_fdset_create ();
- GNUNET_NETWORK_fdset_copy_native (rs, &read_fd_set, max_fd + 1);
+ GNUNET_NETWORK_fdset_copy_native (rs,
+ &read_fd_set,
+ max_fd + 1);
ws = GNUNET_NETWORK_fdset_create ();
- GNUNET_NETWORK_fdset_copy_native (ws, &write_fd_set, max_fd + 1);
+ GNUNET_NETWORK_fdset_copy_native (ws,
+ &write_fd_set,
+ max_fd + 1);
if (NULL == rc->task)
rc->task = GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_DEFAULT,
delay,
@@ -178,15 +166,6 @@ context_task (void *cls)
}
-/**
- * Implementation of the #GNUNET_CURL_RescheduleCallback for GNUnet's
- * scheduler. Will run the CURL context using GNUnet's scheduler.
- * Note that you MUST immediately destroy the reschedule context after
- * calling #GNUNET_CURL_fini().
- *
- * @param cls must point to a `struct GNUNET_CURL_RescheduleContext *`
- * (pointer to a pointer!)
- */
void
GNUNET_CURL_gnunet_scheduler_reschedule (void *cls)
{
@@ -194,7 +173,8 @@ GNUNET_CURL_gnunet_scheduler_reschedule (void *cls)
if (NULL != rc->task)
GNUNET_SCHEDULER_cancel (rc->task);
- rc->task = GNUNET_SCHEDULER_add_now (&context_task, rc);
+ rc->task = GNUNET_SCHEDULER_add_now (&context_task,
+ rc);
}
diff --git a/src/include/gnunet_configuration_lib.h
b/src/include/gnunet_configuration_lib.h
index 3384c6d45..bc862f54f 100644
--- a/src/include/gnunet_configuration_lib.h
+++ b/src/include/gnunet_configuration_lib.h
@@ -160,8 +160,8 @@ GNUNET_CONFIGURATION_serialize (const struct
GNUNET_CONFIGURATION_Handle *cfg,
* present. This memory should be freed by the caller
*/
char *
-GNUNET_CONFIGURATION_serialize_diagnostics (const struct
- GNUNET_CONFIGURATION_Handle *cfg);
+GNUNET_CONFIGURATION_serialize_diagnostics (
+ const struct GNUNET_CONFIGURATION_Handle *cfg);
/**
* De-serializes configuration
@@ -266,8 +266,8 @@ GNUNET_CONFIGURATION_parse_and_run (const char *filename,
* @param cfg configuration handle
*/
void
-GNUNET_CONFIGURATION_enable_diagnostics (struct
- GNUNET_CONFIGURATION_Handle *cfg);
+GNUNET_CONFIGURATION_enable_diagnostics (
+ struct GNUNET_CONFIGURATION_Handle *cfg);
/**
@@ -292,8 +292,8 @@ typedef void
* @param section name of the section
*/
typedef void
-(*GNUNET_CONFIGURATION_Section_Iterator) (void *cls,
- const char *section);
+(*GNUNET_CONFIGURATION_SectionIterator) (void *cls,
+ const char *section);
/**
@@ -319,7 +319,7 @@ GNUNET_CONFIGURATION_iterate (const struct
GNUNET_CONFIGURATION_Handle *cfg,
void
GNUNET_CONFIGURATION_iterate_sections (
const struct GNUNET_CONFIGURATION_Handle *cfg,
- GNUNET_CONFIGURATION_Section_Iterator iter,
+ GNUNET_CONFIGURATION_SectionIterator iter,
void *iter_cls);
@@ -344,11 +344,11 @@ GNUNET_CONFIGURATION_remove_section (struct
GNUNET_CONFIGURATION_Handle *cfg,
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
enum GNUNET_GenericReturnValue
-GNUNET_CONFIGURATION_get_value_number (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option,
- unsigned long long *number);
+GNUNET_CONFIGURATION_get_value_number (
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ const char *option,
+ unsigned long long *number);
/**
@@ -361,11 +361,11 @@ GNUNET_CONFIGURATION_get_value_number (const struct
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
enum GNUNET_GenericReturnValue
-GNUNET_CONFIGURATION_get_value_float (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option,
- float *number);
+GNUNET_CONFIGURATION_get_value_float (
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ const char *option,
+ float *number);
/**
@@ -378,11 +378,11 @@ GNUNET_CONFIGURATION_get_value_float (const struct
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
enum GNUNET_GenericReturnValue
-GNUNET_CONFIGURATION_get_value_time (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option,
- struct GNUNET_TIME_Relative *time);
+GNUNET_CONFIGURATION_get_value_time (
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ const char *option,
+ struct GNUNET_TIME_Relative *time);
/**
@@ -395,11 +395,11 @@ GNUNET_CONFIGURATION_get_value_time (const struct
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
enum GNUNET_GenericReturnValue
-GNUNET_CONFIGURATION_get_value_size (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option,
- unsigned long long *size);
+GNUNET_CONFIGURATION_get_value_size (
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ const char *option,
+ unsigned long long *size);
/**
@@ -446,11 +446,11 @@ GNUNET_CONFIGURATION_get_value_string (
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
enum GNUNET_GenericReturnValue
-GNUNET_CONFIGURATION_get_value_filename (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option,
- char **value);
+GNUNET_CONFIGURATION_get_value_filename (
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ const char *option,
+ char **value);
/**
@@ -464,12 +464,13 @@ GNUNET_CONFIGURATION_get_value_filename (const struct
* @return number of filenames iterated over, -1 on error
*/
int
-GNUNET_CONFIGURATION_iterate_value_filenames (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option,
- GNUNET_FileNameCallback cb,
- void *cb_cls);
+GNUNET_CONFIGURATION_iterate_value_filenames (
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ const char *option,
+ GNUNET_FileNameCallback cb,
+ void *cb_cls);
+
/**
* Iterate over values of a section in the configuration.
@@ -480,11 +481,12 @@ GNUNET_CONFIGURATION_iterate_value_filenames (const struct
* @param iter_cls closure for @a iter
*/
void
-GNUNET_CONFIGURATION_iterate_section_values (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- GNUNET_CONFIGURATION_Iterator
iter,
- void *iter_cls);
+GNUNET_CONFIGURATION_iterate_section_values (
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ GNUNET_CONFIGURATION_Iterator iter,
+ void *iter_cls);
+
/**
* Get a configuration value that should be in a set of
@@ -499,12 +501,13 @@ GNUNET_CONFIGURATION_iterate_section_values (const struct
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
enum GNUNET_GenericReturnValue
-GNUNET_CONFIGURATION_get_value_choice (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option,
- const char *const *choices,
- const char **value);
+GNUNET_CONFIGURATION_get_value_choice (
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ const char *option,
+ const char *const *choices,
+ const char **value);
+
/**
* Get a configuration value that should be in a set of
@@ -516,10 +519,10 @@ GNUNET_CONFIGURATION_get_value_choice (const struct
* @return #GNUNET_YES, #GNUNET_NO or if option has no valid value,
#GNUNET_SYSERR
*/
enum GNUNET_GenericReturnValue
-GNUNET_CONFIGURATION_get_value_yesno (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option);
+GNUNET_CONFIGURATION_get_value_yesno (
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ const char *option);
/**
@@ -606,11 +609,11 @@ GNUNET_CONFIGURATION_set_value_string (struct
GNUNET_CONFIGURATION_Handle *cfg,
* #GNUNET_SYSERR if the filename is not in the list
*/
enum GNUNET_GenericReturnValue
-GNUNET_CONFIGURATION_remove_value_filename (struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option,
- const char *value);
+GNUNET_CONFIGURATION_remove_value_filename (
+ struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ const char *option,
+ const char *value);
/**
@@ -625,11 +628,11 @@ GNUNET_CONFIGURATION_remove_value_filename (struct
* #GNUNET_SYSERR if the filename already in the list
*/
enum GNUNET_GenericReturnValue
-GNUNET_CONFIGURATION_append_value_filename (struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option,
- const char *value);
+GNUNET_CONFIGURATION_append_value_filename (
+ struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ const char *option,
+ const char *value);
/**
diff --git a/src/util/configuration.c b/src/util/configuration.c
index d9d6721cc..27e6cf612 100644
--- a/src/util/configuration.c
+++ b/src/util/configuration.c
@@ -1433,7 +1433,7 @@ GNUNET_CONFIGURATION_iterate_section_values (
void
GNUNET_CONFIGURATION_iterate_sections (
const struct GNUNET_CONFIGURATION_Handle *cfg,
- GNUNET_CONFIGURATION_Section_Iterator iter,
+ GNUNET_CONFIGURATION_SectionIterator iter,
void *iter_cls)
{
struct ConfigSection *spos;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: -style fixes,
gnunet <=