diff options
Diffstat (limited to 'src/ats/gnunet-service-ats_normalization.c')
-rw-r--r-- | src/ats/gnunet-service-ats_normalization.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/ats/gnunet-service-ats_normalization.c b/src/ats/gnunet-service-ats_normalization.c index 8eaedc92d..0d0b63e9d 100644 --- a/src/ats/gnunet-service-ats_normalization.c +++ b/src/ats/gnunet-service-ats_normalization.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | (C) 2011-2015 Christian Grothoff (and other contributing authors) | 3 | Copyright (C) 2011-2015 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -74,8 +74,7 @@ static struct Property properties[GNUNET_ATS_QualityPropertiesCount]; | |||
74 | * | 74 | * |
75 | * @param cls ignored | 75 | * @param cls ignored |
76 | * @param address the address | 76 | * @param address the address |
77 | * @return pointer to the values, can be indexed with GNUNET_ATS_PreferenceKind, | 77 | * @return pointer to the values, can be indexed with GNUNET_ATS_PreferenceKind |
78 | * default preferences if peer does not exist | ||
79 | */ | 78 | */ |
80 | const double * | 79 | const double * |
81 | GAS_normalization_get_properties (void *cls, | 80 | GAS_normalization_get_properties (void *cls, |
@@ -100,7 +99,7 @@ GAS_normalization_get_properties (void *cls, | |||
100 | * | 99 | * |
101 | * @param address the address | 100 | * @param address the address |
102 | * @param atsi the ats information | 101 | * @param atsi the ats information |
103 | * @return the new average or GNUNET_ATS_VALUE_UNDEFINED | 102 | * @return the new average or #GNUNET_ATS_VALUE_UNDEFINED |
104 | */ | 103 | */ |
105 | static uint32_t | 104 | static uint32_t |
106 | property_average (struct ATS_Address *address, | 105 | property_average (struct ATS_Address *address, |
@@ -252,9 +251,12 @@ normalize_address (void *cls, | |||
252 | 251 | ||
253 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 252 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
254 | "Normalize `%s' address %p's '%s' with value %u to range [%u..%u] = %.3f\n", | 253 | "Normalize `%s' address %p's '%s' with value %u to range [%u..%u] = %.3f\n", |
255 | GNUNET_i2s (&address->peer), address, | 254 | GNUNET_i2s (&address->peer), |
255 | address, | ||
256 | GNUNET_ATS_print_property_type (p->atsi_type), | 256 | GNUNET_ATS_print_property_type (p->atsi_type), |
257 | address->atsin[p->prop_type].avg, p->min, p->max, | 257 | address->atsin[p->prop_type].avg, |
258 | p->min, | ||
259 | p->max, | ||
258 | address->atsin[p->prop_type].norm); | 260 | address->atsin[p->prop_type].norm); |
259 | GAS_normalized_property_changed (address, | 261 | GAS_normalized_property_changed (address, |
260 | p->atsi_type, | 262 | p->atsi_type, |
@@ -350,8 +352,8 @@ GAS_normalization_normalize_property (struct ATS_Address *address, | |||
350 | uint32_t atsi_count) | 352 | uint32_t atsi_count) |
351 | { | 353 | { |
352 | struct Property *cur_prop; | 354 | struct Property *cur_prop; |
353 | int c1; | 355 | unsigned int c1; |
354 | int c2; | 356 | unsigned int c2; |
355 | uint32_t current_type; | 357 | uint32_t current_type; |
356 | uint32_t current_val; | 358 | uint32_t current_val; |
357 | unsigned int existing_properties[] = GNUNET_ATS_QualityProperties; | 359 | unsigned int existing_properties[] = GNUNET_ATS_QualityProperties; |