diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-02-05 19:58:37 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-02-05 19:58:37 +0000 |
commit | 804ba15e1e5521547f7cff2252b2eae4e63da590 (patch) | |
tree | 439f4ad2c8694ad4a0e9368292dd4cb2069d7ed9 /src | |
parent | 25d991395e2ea75d77d5ae87dca27ba5cd94e940 (diff) | |
download | gnunet-804ba15e1e5521547f7cff2252b2eae4e63da590.tar.gz gnunet-804ba15e1e5521547f7cff2252b2eae4e63da590.zip |
dead code elimination
Diffstat (limited to 'src')
-rw-r--r-- | src/ats/gnunet-service-ats_preferences.c | 38 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_preferences.h | 14 |
2 files changed, 0 insertions, 52 deletions
diff --git a/src/ats/gnunet-service-ats_preferences.c b/src/ats/gnunet-service-ats_preferences.c index ef7d94938..ea0210acb 100644 --- a/src/ats/gnunet-service-ats_preferences.c +++ b/src/ats/gnunet-service-ats_preferences.c | |||
@@ -838,44 +838,6 @@ GAS_normalization_get_preferences_by_peer (void *cls, | |||
838 | 838 | ||
839 | 839 | ||
840 | /** | 840 | /** |
841 | * Get the normalized preference values for a specific client and peer | ||
842 | * | ||
843 | * @param client client | ||
844 | * @param peer the peer | ||
845 | * @param pref the preference type | ||
846 | * @return the value | ||
847 | */ | ||
848 | double | ||
849 | GAS_normalization_get_preferences_by_client (const struct GNUNET_SERVER_Client *client, | ||
850 | const struct GNUNET_PeerIdentity *peer, | ||
851 | enum GNUNET_ATS_PreferenceKind pref) | ||
852 | { | ||
853 | struct PreferenceClient *c_cur; | ||
854 | struct PreferencePeer *p_cur; | ||
855 | |||
856 | /* Find preference client */ | ||
857 | for (c_cur = pc_head; NULL != c_cur; c_cur = c_cur->next) | ||
858 | { | ||
859 | if (client == c_cur->client) | ||
860 | break; | ||
861 | } | ||
862 | if (NULL == c_cur) | ||
863 | return -1.0; | ||
864 | |||
865 | for (p_cur = c_cur->p_head; NULL != p_cur; p_cur = p_cur->next) | ||
866 | { | ||
867 | if (0 == memcmp (peer, &p_cur->id, sizeof (struct GNUNET_PeerIdentity))) | ||
868 | break; | ||
869 | } | ||
870 | if (NULL == p_cur) | ||
871 | return DEFAULT_REL_PREFERENCE; /* Not found, return default */ | ||
872 | |||
873 | return p_cur->f_rel[pref]; | ||
874 | } | ||
875 | |||
876 | |||
877 | |||
878 | /** | ||
879 | * A performance client disconnected | 841 | * A performance client disconnected |
880 | * | 842 | * |
881 | * @param client the client | 843 | * @param client the client |
diff --git a/src/ats/gnunet-service-ats_preferences.h b/src/ats/gnunet-service-ats_preferences.h index ee8c931d6..e17a8bd22 100644 --- a/src/ats/gnunet-service-ats_preferences.h +++ b/src/ats/gnunet-service-ats_preferences.h | |||
@@ -62,20 +62,6 @@ GAS_normalization_get_preferences_by_peer (void *cls, | |||
62 | 62 | ||
63 | 63 | ||
64 | /** | 64 | /** |
65 | * Get the normalized preference values for a specific client and peer | ||
66 | * | ||
67 | * @param client client | ||
68 | * @param peer the peer | ||
69 | * @param pref the preference type | ||
70 | * @return the value | ||
71 | */ | ||
72 | double | ||
73 | GAS_normalization_get_preferences_by_client (const struct GNUNET_SERVER_Client *client, | ||
74 | const struct GNUNET_PeerIdentity *peer, | ||
75 | enum GNUNET_ATS_PreferenceKind pref); | ||
76 | |||
77 | |||
78 | /** | ||
79 | * Normalize an updated preference value | 65 | * Normalize an updated preference value |
80 | * | 66 | * |
81 | * @param client the client with this preference | 67 | * @param client the client with this preference |