diff options
Diffstat (limited to 'src/reclaim/reclaim_attribute.c')
-rw-r--r-- | src/reclaim/reclaim_attribute.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/reclaim/reclaim_attribute.c b/src/reclaim/reclaim_attribute.c index 5d7adb7e6..b5c41b2d1 100644 --- a/src/reclaim/reclaim_attribute.c +++ b/src/reclaim/reclaim_attribute.c | |||
@@ -325,16 +325,9 @@ GNUNET_RECLAIM_attribute_list_serialize_get_size ( | |||
325 | } | 325 | } |
326 | 326 | ||
327 | 327 | ||
328 | /** | ||
329 | * Serialize an attribute list | ||
330 | * | ||
331 | * @param attrs the attribute list to serialize | ||
332 | * @param result the serialized attribute | ||
333 | * @return length of serialized data | ||
334 | */ | ||
335 | size_t | 328 | size_t |
336 | GNUNET_RECLAIM_attribute_list_serialize ( | 329 | GNUNET_RECLAIM_attribute_list_serialize ( |
337 | const struct GNUNET_RECLAIM_AttributeList *al, | 330 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
338 | char *result) | 331 | char *result) |
339 | { | 332 | { |
340 | struct GNUNET_RECLAIM_AttributeListEntry *ale; | 333 | struct GNUNET_RECLAIM_AttributeListEntry *ale; |
@@ -343,7 +336,7 @@ GNUNET_RECLAIM_attribute_list_serialize ( | |||
343 | char *write_ptr; | 336 | char *write_ptr; |
344 | write_ptr = result; | 337 | write_ptr = result; |
345 | total_len = 0; | 338 | total_len = 0; |
346 | for (ale = al->list_head; NULL != ale; ale = ale->next) | 339 | for (ale = attrs->list_head; NULL != ale; ale = ale->next) |
347 | { | 340 | { |
348 | GNUNET_assert (NULL != ale->attribute); | 341 | GNUNET_assert (NULL != ale->attribute); |
349 | len = GNUNET_RECLAIM_attribute_serialize (ale->attribute, write_ptr); | 342 | len = GNUNET_RECLAIM_attribute_serialize (ale->attribute, write_ptr); |
@@ -396,21 +389,16 @@ GNUNET_RECLAIM_attribute_list_deserialize (const char *data, size_t data_size) | |||
396 | } | 389 | } |
397 | 390 | ||
398 | 391 | ||
399 | /** | ||
400 | * Make a (deep) copy of a claim list | ||
401 | * @param attrs claim list to copy | ||
402 | * @return copied claim list | ||
403 | */ | ||
404 | struct GNUNET_RECLAIM_AttributeList * | 392 | struct GNUNET_RECLAIM_AttributeList * |
405 | GNUNET_RECLAIM_attribute_list_dup ( | 393 | GNUNET_RECLAIM_attribute_list_dup ( |
406 | const struct GNUNET_RECLAIM_AttributeList *al) | 394 | const struct GNUNET_RECLAIM_AttributeList *attrs) |
407 | { | 395 | { |
408 | struct GNUNET_RECLAIM_AttributeListEntry *ale; | 396 | struct GNUNET_RECLAIM_AttributeListEntry *ale; |
409 | struct GNUNET_RECLAIM_AttributeListEntry *result_ale; | 397 | struct GNUNET_RECLAIM_AttributeListEntry *result_ale; |
410 | struct GNUNET_RECLAIM_AttributeList *result; | 398 | struct GNUNET_RECLAIM_AttributeList *result; |
411 | 399 | ||
412 | result = GNUNET_new (struct GNUNET_RECLAIM_AttributeList); | 400 | result = GNUNET_new (struct GNUNET_RECLAIM_AttributeList); |
413 | for (ale = al->list_head; NULL != ale; ale = ale->next) | 401 | for (ale = attrs->list_head; NULL != ale; ale = ale->next) |
414 | { | 402 | { |
415 | result_ale = GNUNET_new (struct GNUNET_RECLAIM_AttributeListEntry); | 403 | result_ale = GNUNET_new (struct GNUNET_RECLAIM_AttributeListEntry); |
416 | GNUNET_assert (NULL != ale->attribute); | 404 | GNUNET_assert (NULL != ale->attribute); |
@@ -433,11 +421,6 @@ GNUNET_RECLAIM_attribute_list_dup ( | |||
433 | } | 421 | } |
434 | 422 | ||
435 | 423 | ||
436 | /** | ||
437 | * Destroy claim list | ||
438 | * | ||
439 | * @param attrs list to destroy | ||
440 | */ | ||
441 | void | 424 | void |
442 | GNUNET_RECLAIM_attribute_list_destroy ( | 425 | GNUNET_RECLAIM_attribute_list_destroy ( |
443 | struct GNUNET_RECLAIM_AttributeList *al) | 426 | struct GNUNET_RECLAIM_AttributeList *al) |