aboutsummaryrefslogtreecommitdiff
path: root/src/ats
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-10-24 13:15:38 +0000
committerChristian Grothoff <christian@grothoff.org>2012-10-24 13:15:38 +0000
commit45d504e2a7cdf5a9fe0482574dfa45f6f364cb38 (patch)
treec4ba1d1c80babc99ba80a260a61d4e9dd90c643c /src/ats
parentbdc946d2539710a2882fb8fb99ce7d5ae996aa4f (diff)
downloadgnunet-45d504e2a7cdf5a9fe0482574dfa45f6f364cb38.tar.gz
gnunet-45d504e2a7cdf5a9fe0482574dfa45f6f364cb38.zip
-simplify
Diffstat (limited to 'src/ats')
-rw-r--r--src/ats/ats_api_scheduling.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c
index 2c9e2ebba..6cc9cfa66 100644
--- a/src/ats/ats_api_scheduling.c
+++ b/src/ats/ats_api_scheduling.c
@@ -823,6 +823,7 @@ GNUNET_ATS_address_get_type (struct GNUNET_ATS_SchedulingHandle * sh, const stru
823 GNUNET_assert (sh != NULL); 823 GNUNET_assert (sh != NULL);
824 struct ATS_Network * cur = sh->net_head; 824 struct ATS_Network * cur = sh->net_head;
825 int type = GNUNET_ATS_NET_UNSPECIFIED; 825 int type = GNUNET_ATS_NET_UNSPECIFIED;
826 struct GNUNET_ATS_Information ats;
826 827
827 if (addr->sa_family == AF_UNIX) 828 if (addr->sa_family == AF_UNIX)
828 { 829 {
@@ -902,9 +903,8 @@ GNUNET_ATS_address_get_type (struct GNUNET_ATS_SchedulingHandle * sh, const stru
902 /* no local network found for this address, default: WAN */ 903 /* no local network found for this address, default: WAN */
903 if (type == GNUNET_ATS_NET_UNSPECIFIED) 904 if (type == GNUNET_ATS_NET_UNSPECIFIED)
904 type = GNUNET_ATS_NET_WAN; 905 type = GNUNET_ATS_NET_WAN;
905 const struct GNUNET_ATS_Information ats = { 906 ats.type = htonl (GNUNET_ATS_NETWORK_TYPE);
906 htonl (GNUNET_ATS_NETWORK_TYPE), 907 ats.value = htonl (type);
907 htonl (type) };
908 return ats; 908 return ats;
909} 909}
910 910