diff options
author | Руслан Ижбулатов <lrn1986@gmail.com> | 2017-02-25 12:50:24 +0000 |
---|---|---|
committer | Руслан Ижбулатов <lrn1986@gmail.com> | 2017-02-25 21:03:32 +0000 |
commit | 31f699c7eeacc991abad778f881f51b0dbdcbc6d (patch) | |
tree | b8ff1ccf0ec34b3fc7f38c05c7c8e61c7a625c7a /src/cadet | |
parent | 0eb3848d99441a237ba2a6585a3c054d67f28c53 (diff) | |
download | gnunet-31f699c7eeacc991abad778f881f51b0dbdcbc6d.tar.gz gnunet-31f699c7eeacc991abad778f881f51b0dbdcbc6d.zip |
W32: cast ntohl() result to uint32_t
W32 version of ntohl() returns u_long. Thank you, Microsoft!
Diffstat (limited to 'src/cadet')
-rw-r--r-- | src/cadet/gnunet-cadet-profiler.c | 4 | ||||
-rw-r--r-- | src/cadet/gnunet-service-cadet-new.c | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/cadet/gnunet-cadet-profiler.c b/src/cadet/gnunet-cadet-profiler.c index d688dc60b..15da05b6d 100644 --- a/src/cadet/gnunet-cadet-profiler.c +++ b/src/cadet/gnunet-cadet-profiler.c | |||
@@ -778,7 +778,9 @@ pong_handler (void *cls, struct GNUNET_CADET_Channel *channel, | |||
778 | latency = GNUNET_TIME_absolute_get_duration (send_time); | 778 | latency = GNUNET_TIME_absolute_get_duration (send_time); |
779 | r = ntohl (msg->round_number); | 779 | r = ntohl (msg->round_number); |
780 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u <- %u (%u) latency: %s\n", | 780 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u <- %u (%u) latency: %s\n", |
781 | get_index (peer), get_index (peer->dest), ntohl (msg->counter), | 781 | get_index (peer), |
782 | get_index (peer->dest), | ||
783 | (uint32_t) ntohl (msg->counter), | ||
782 | GNUNET_STRINGS_relative_time_to_string (latency, GNUNET_NO)); | 784 | GNUNET_STRINGS_relative_time_to_string (latency, GNUNET_NO)); |
783 | 785 | ||
784 | /* Online variance calculation */ | 786 | /* Online variance calculation */ |
diff --git a/src/cadet/gnunet-service-cadet-new.c b/src/cadet/gnunet-service-cadet-new.c index a9b30ccd5..b0a818c7c 100644 --- a/src/cadet/gnunet-service-cadet-new.c +++ b/src/cadet/gnunet-service-cadet-new.c | |||
@@ -306,8 +306,8 @@ GSC_bind (struct CadetClient *c, | |||
306 | GCCH_2s (ch), | 306 | GCCH_2s (ch), |
307 | GCP_2s (dest), | 307 | GCP_2s (dest), |
308 | GNUNET_h2s (port), | 308 | GNUNET_h2s (port), |
309 | ntohl (options), | 309 | (uint32_t) ntohl (options), |
310 | ntohl (ccn.channel_of_client)); | 310 | (uint32_t) ntohl (ccn.channel_of_client)); |
311 | /* notify local client about incoming connection! */ | 311 | /* notify local client about incoming connection! */ |
312 | env = GNUNET_MQ_msg (cm, | 312 | env = GNUNET_MQ_msg (cm, |
313 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_CREATE); | 313 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_CREATE); |
@@ -622,7 +622,7 @@ handle_channel_destroy (void *cls, | |||
622 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 622 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
623 | "%s tried to destroy unknown channel %X\n", | 623 | "%s tried to destroy unknown channel %X\n", |
624 | GSC_2s(c), | 624 | GSC_2s(c), |
625 | ntohl (msg->ccn.channel_of_client)); | 625 | (uint32_t) ntohl (msg->ccn.channel_of_client)); |
626 | return; | 626 | return; |
627 | } | 627 | } |
628 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 628 | LOG (GNUNET_ERROR_TYPE_DEBUG, |