diff options
Diffstat (limited to 'src/set/plugin_block_set_test.c')
-rw-r--r-- | src/set/plugin_block_set_test.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/set/plugin_block_set_test.c b/src/set/plugin_block_set_test.c index f7bdb8920..e7322aea0 100644 --- a/src/set/plugin_block_set_test.c +++ b/src/set/plugin_block_set_test.c | |||
@@ -11,12 +11,12 @@ | |||
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 | ||
18 | SPDX-License-Identifier: AGPL3.0-or-later | 18 | SPDX-License-Identifier: AGPL3.0-or-later |
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file set/plugin_block_set_test.c | 22 | * @file set/plugin_block_set_test.c |
@@ -46,20 +46,20 @@ | |||
46 | * @return characterization of result | 46 | * @return characterization of result |
47 | */ | 47 | */ |
48 | static enum GNUNET_BLOCK_EvaluationResult | 48 | static enum GNUNET_BLOCK_EvaluationResult |
49 | block_plugin_set_test_evaluate (void *cls, | 49 | block_plugin_set_test_evaluate(void *cls, |
50 | struct GNUNET_BLOCK_Context *ctx, | 50 | struct GNUNET_BLOCK_Context *ctx, |
51 | enum GNUNET_BLOCK_Type type, | 51 | enum GNUNET_BLOCK_Type type, |
52 | struct GNUNET_BLOCK_Group *group, | 52 | struct GNUNET_BLOCK_Group *group, |
53 | enum GNUNET_BLOCK_EvaluationOptions eo, | 53 | enum GNUNET_BLOCK_EvaluationOptions eo, |
54 | const struct GNUNET_HashCode *query, | 54 | const struct GNUNET_HashCode *query, |
55 | const void *xquery, | 55 | const void *xquery, |
56 | size_t xquery_size, | 56 | size_t xquery_size, |
57 | const void *reply_block, | 57 | const void *reply_block, |
58 | size_t reply_block_size) | 58 | size_t reply_block_size) |
59 | { | 59 | { |
60 | if ( (NULL == reply_block) || | 60 | if ((NULL == reply_block) || |
61 | (reply_block_size == 0) || | 61 | (reply_block_size == 0) || |
62 | (0 != ((char *) reply_block)[0]) ) | 62 | (0 != ((char *)reply_block)[0])) |
63 | return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; | 63 | return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; |
64 | return GNUNET_BLOCK_EVALUATION_OK_MORE; | 64 | return GNUNET_BLOCK_EVALUATION_OK_MORE; |
65 | } | 65 | } |
@@ -77,11 +77,11 @@ block_plugin_set_test_evaluate (void *cls, | |||
77 | * (or if extracting a key from a block of this type does not work) | 77 | * (or if extracting a key from a block of this type does not work) |
78 | */ | 78 | */ |
79 | static int | 79 | static int |
80 | block_plugin_set_test_get_key (void *cls, | 80 | block_plugin_set_test_get_key(void *cls, |
81 | enum GNUNET_BLOCK_Type type, | 81 | enum GNUNET_BLOCK_Type type, |
82 | const void *block, | 82 | const void *block, |
83 | size_t block_size, | 83 | size_t block_size, |
84 | struct GNUNET_HashCode *key) | 84 | struct GNUNET_HashCode *key) |
85 | { | 85 | { |
86 | return GNUNET_SYSERR; | 86 | return GNUNET_SYSERR; |
87 | } | 87 | } |
@@ -91,7 +91,7 @@ block_plugin_set_test_get_key (void *cls, | |||
91 | * Entry point for the plugin. | 91 | * Entry point for the plugin. |
92 | */ | 92 | */ |
93 | void * | 93 | void * |
94 | libgnunet_plugin_block_set_test_init (void *cls) | 94 | libgnunet_plugin_block_set_test_init(void *cls) |
95 | { | 95 | { |
96 | static enum GNUNET_BLOCK_Type types[] = | 96 | static enum GNUNET_BLOCK_Type types[] = |
97 | { | 97 | { |
@@ -100,7 +100,7 @@ libgnunet_plugin_block_set_test_init (void *cls) | |||
100 | }; | 100 | }; |
101 | struct GNUNET_BLOCK_PluginFunctions *api; | 101 | struct GNUNET_BLOCK_PluginFunctions *api; |
102 | 102 | ||
103 | api = GNUNET_new (struct GNUNET_BLOCK_PluginFunctions); | 103 | api = GNUNET_new(struct GNUNET_BLOCK_PluginFunctions); |
104 | api->evaluate = &block_plugin_set_test_evaluate; | 104 | api->evaluate = &block_plugin_set_test_evaluate; |
105 | api->get_key = &block_plugin_set_test_get_key; | 105 | api->get_key = &block_plugin_set_test_get_key; |
106 | api->types = types; | 106 | api->types = types; |
@@ -112,11 +112,11 @@ libgnunet_plugin_block_set_test_init (void *cls) | |||
112 | * Exit point from the plugin. | 112 | * Exit point from the plugin. |
113 | */ | 113 | */ |
114 | void * | 114 | void * |
115 | libgnunet_plugin_block_set_test_done (void *cls) | 115 | libgnunet_plugin_block_set_test_done(void *cls) |
116 | { | 116 | { |
117 | struct GNUNET_BLOCK_PluginFunctions *api = cls; | 117 | struct GNUNET_BLOCK_PluginFunctions *api = cls; |
118 | 118 | ||
119 | GNUNET_free (api); | 119 | GNUNET_free(api); |
120 | return NULL; | 120 | return NULL; |
121 | } | 121 | } |
122 | 122 | ||