diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-05-22 16:14:13 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-05-22 16:14:13 +0200 |
commit | f9c41505dd2ad80d08d6b516c534df0a66ea55fc (patch) | |
tree | ad5d5fa6dc017b992672f2cef69eb727cad3a09e | |
parent | bfae6004afb35785b3b6cae889282242d4d49d3b (diff) | |
download | gnunet-f9c41505dd2ad80d08d6b516c534df0a66ea55fc.tar.gz gnunet-f9c41505dd2ad80d08d6b516c534df0a66ea55fc.zip |
clang-format
-rw-r--r-- | src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c | 22 | ||||
-rw-r--r-- | src/reclaim-attribute/reclaim_attribute.c | 54 | ||||
-rw-r--r-- | src/reclaim-attribute/reclaim_attribute.h | 2 |
3 files changed, 39 insertions, 39 deletions
diff --git a/src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c b/src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c index bd0bb1741..8999bcadf 100644 --- a/src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c +++ b/src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c | |||
@@ -50,10 +50,10 @@ gnuid_value_to_string (void *cls, | |||
50 | 50 | ||
51 | switch (type) | 51 | switch (type) |
52 | { | 52 | { |
53 | case GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING: | 53 | case GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING: |
54 | return GNUNET_strndup (data, data_size); | 54 | return GNUNET_strndup (data, data_size); |
55 | default: | 55 | default: |
56 | return NULL; | 56 | return NULL; |
57 | } | 57 | } |
58 | } | 58 | } |
59 | 59 | ||
@@ -81,12 +81,12 @@ gnuid_string_to_value (void *cls, | |||
81 | switch (type) | 81 | switch (type) |
82 | { | 82 | { |
83 | 83 | ||
84 | case GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING: | 84 | case GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING: |
85 | *data = GNUNET_strdup (s); | 85 | *data = GNUNET_strdup (s); |
86 | *data_size = strlen (s); | 86 | *data_size = strlen (s); |
87 | return GNUNET_OK; | 87 | return GNUNET_OK; |
88 | default: | 88 | default: |
89 | return GNUNET_SYSERR; | 89 | return GNUNET_SYSERR; |
90 | } | 90 | } |
91 | } | 91 | } |
92 | 92 | ||
@@ -100,7 +100,7 @@ static struct | |||
100 | const char *name; | 100 | const char *name; |
101 | uint32_t number; | 101 | uint32_t number; |
102 | } gnuid_name_map[] = {{"STRING", GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING}, | 102 | } gnuid_name_map[] = {{"STRING", GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING}, |
103 | {NULL, UINT32_MAX}}; | 103 | {NULL, UINT32_MAX}}; |
104 | 104 | ||
105 | 105 | ||
106 | /** | 106 | /** |
diff --git a/src/reclaim-attribute/reclaim_attribute.c b/src/reclaim-attribute/reclaim_attribute.c index b5eed8c2b..b9465bef7 100644 --- a/src/reclaim-attribute/reclaim_attribute.c +++ b/src/reclaim-attribute/reclaim_attribute.c | |||
@@ -1,22 +1,22 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet | 2 | This file is part of GNUnet |
3 | Copyright (C) 2010-2015 GNUnet e.V. | 3 | Copyright (C) 2010-2015 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software: you can redistribute it and/or modify it | 5 | GNUnet is free software: you can redistribute it and/or modify it |
6 | under the terms of the GNU Affero General Public License as published | 6 | under the terms of the GNU Affero General Public License as published |
7 | by the Free Software Foundation, either version 3 of the License, | 7 | by the Free Software Foundation, either version 3 of the License, |
8 | or (at your option) any later version. | 8 | or (at your option) any later version. |
9 | 9 | ||
10 | GNUnet is distributed in the hope that it will be useful, but | 10 | GNUnet is distributed in the hope that it will be useful, but |
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 reclaim-attribute/reclaim_attribute.c | 22 | * @file reclaim-attribute/reclaim_attribute.c |
@@ -265,11 +265,11 @@ GNUNET_RECLAIM_ATTRIBUTE_claim_new (const char *attr_name, | |||
265 | */ | 265 | */ |
266 | void | 266 | void |
267 | GNUNET_RECLAIM_ATTRIBUTE_list_add ( | 267 | GNUNET_RECLAIM_ATTRIBUTE_list_add ( |
268 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *claim_list, | 268 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *claim_list, |
269 | const char *attr_name, | 269 | const char *attr_name, |
270 | uint32_t type, | 270 | uint32_t type, |
271 | const void *data, | 271 | const void *data, |
272 | size_t data_size) | 272 | size_t data_size) |
273 | { | 273 | { |
274 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; | 274 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
275 | le = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry); | 275 | le = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry); |
@@ -289,7 +289,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_add ( | |||
289 | */ | 289 | */ |
290 | size_t | 290 | size_t |
291 | GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size ( | 291 | GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size ( |
292 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs) | 292 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs) |
293 | { | 293 | { |
294 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; | 294 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
295 | size_t len = 0; | 295 | size_t len = 0; |
@@ -308,8 +308,8 @@ GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size ( | |||
308 | */ | 308 | */ |
309 | size_t | 309 | size_t |
310 | GNUNET_RECLAIM_ATTRIBUTE_list_serialize ( | 310 | GNUNET_RECLAIM_ATTRIBUTE_list_serialize ( |
311 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, | 311 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, |
312 | char *result) | 312 | char *result) |
313 | { | 313 | { |
314 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; | 314 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
315 | size_t len; | 315 | size_t len; |
@@ -373,7 +373,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_deserialize (const char *data, size_t data_size) | |||
373 | */ | 373 | */ |
374 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList * | 374 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList * |
375 | GNUNET_RECLAIM_ATTRIBUTE_list_dup ( | 375 | GNUNET_RECLAIM_ATTRIBUTE_list_dup ( |
376 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs) | 376 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs) |
377 | { | 377 | { |
378 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; | 378 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
379 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *result_le; | 379 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *result_le; |
@@ -405,7 +405,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_dup ( | |||
405 | */ | 405 | */ |
406 | void | 406 | void |
407 | GNUNET_RECLAIM_ATTRIBUTE_list_destroy ( | 407 | GNUNET_RECLAIM_ATTRIBUTE_list_destroy ( |
408 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs) | 408 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs) |
409 | { | 409 | { |
410 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; | 410 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
411 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *tmp_le; | 411 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *tmp_le; |
@@ -429,7 +429,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_destroy ( | |||
429 | */ | 429 | */ |
430 | size_t | 430 | size_t |
431 | GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size ( | 431 | GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size ( |
432 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr) | 432 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr) |
433 | { | 433 | { |
434 | return sizeof (struct Attribute) + strlen (attr->name) + attr->data_size; | 434 | return sizeof (struct Attribute) + strlen (attr->name) + attr->data_size; |
435 | } | 435 | } |
@@ -444,8 +444,8 @@ GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size ( | |||
444 | */ | 444 | */ |
445 | size_t | 445 | size_t |
446 | GNUNET_RECLAIM_ATTRIBUTE_serialize ( | 446 | GNUNET_RECLAIM_ATTRIBUTE_serialize ( |
447 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, | 447 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, |
448 | char *result) | 448 | char *result) |
449 | { | 449 | { |
450 | size_t data_len_ser; | 450 | size_t data_len_ser; |
451 | size_t name_len; | 451 | size_t name_len; |
diff --git a/src/reclaim-attribute/reclaim_attribute.h b/src/reclaim-attribute/reclaim_attribute.h index f0c944bdb..b6de147a2 100644 --- a/src/reclaim-attribute/reclaim_attribute.h +++ b/src/reclaim-attribute/reclaim_attribute.h | |||
@@ -15,7 +15,7 @@ | |||
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 | * @author Martin Schanzenbach | 21 | * @author Martin Schanzenbach |