[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 11/14: W32: cast ntohl() result to uint32_t
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 11/14: W32: cast ntohl() result to uint32_t |
Date: |
Sat, 25 Feb 2017 22:05:01 +0100 |
This is an automated email from the git hooks/post-receive script.
lrn pushed a commit to branch master
in repository gnunet.
commit 31f699c7eeacc991abad778f881f51b0dbdcbc6d
Author: Руслан Ижбулатов <address@hidden>
AuthorDate: Sat Feb 25 12:50:24 2017 +0000
W32: cast ntohl() result to uint32_t
W32 version of ntohl() returns u_long. Thank you, Microsoft!
---
src/cadet/gnunet-cadet-profiler.c | 4 +++-
src/cadet/gnunet-service-cadet-new.c | 6 +++---
src/datastore/gnunet-service-datastore.c | 8 ++++----
src/peerstore/gnunet-service-peerstore.c | 4 ++--
src/revocation/revocation_api.c | 4 ++--
src/set/gnunet-service-set.c | 8 ++++----
6 files changed, 18 insertions(+), 16 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,
latency = GNUNET_TIME_absolute_get_duration (send_time);
r = ntohl (msg->round_number);
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u <- %u (%u) latency: %s\n",
- get_index (peer), get_index (peer->dest), ntohl (msg->counter),
+ get_index (peer),
+ get_index (peer->dest),
+ (uint32_t) ntohl (msg->counter),
GNUNET_STRINGS_relative_time_to_string (latency, GNUNET_NO));
/* 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,
GCCH_2s (ch),
GCP_2s (dest),
GNUNET_h2s (port),
- ntohl (options),
- ntohl (ccn.channel_of_client));
+ (uint32_t) ntohl (options),
+ (uint32_t) ntohl (ccn.channel_of_client));
/* notify local client about incoming connection! */
env = GNUNET_MQ_msg (cm,
GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_CREATE);
@@ -622,7 +622,7 @@ handle_channel_destroy (void *cls,
LOG (GNUNET_ERROR_TYPE_DEBUG,
"%s tried to destroy unknown channel %X\n",
GSC_2s(c),
- ntohl (msg->ccn.channel_of_client));
+ (uint32_t) ntohl (msg->ccn.channel_of_client));
return;
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
diff --git a/src/datastore/gnunet-service-datastore.c
b/src/datastore/gnunet-service-datastore.c
index 445c3576e..1e699fea3 100644
--- a/src/datastore/gnunet-service-datastore.c
+++ b/src/datastore/gnunet-service-datastore.c
@@ -949,7 +949,7 @@ handle_put (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Processing PUT request for `%s' of type %u\n",
GNUNET_h2s (&dm->key),
- ntohl (dm->type));
+ (uint32_t) ntohl (dm->type));
rid = ntohl (dm->rid);
size = ntohl (dm->size);
if (rid > 0)
@@ -1012,7 +1012,7 @@ handle_get (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Processing GET request of type %u\n",
- ntohl (msg->type));
+ (uint32_t) ntohl (msg->type));
GNUNET_STATISTICS_update (stats,
gettext_noop ("# GET requests received"),
1,
@@ -1043,7 +1043,7 @@ handle_get_key (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Processing GET request for `%s' of type %u\n",
GNUNET_h2s (&msg->key),
- ntohl (msg->type));
+ (uint32_t) ntohl (msg->type));
GNUNET_STATISTICS_update (stats,
gettext_noop ("# GET KEY requests received"),
1,
@@ -1238,7 +1238,7 @@ handle_remove (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Processing REMOVE request for `%s' of type %u\n",
GNUNET_h2s (&dm->key),
- ntohl (dm->type));
+ (uint32_t) ntohl (dm->type));
plugin->api->get_key (plugin->api->cls,
0,
&dm->key,
diff --git a/src/peerstore/gnunet-service-peerstore.c
b/src/peerstore/gnunet-service-peerstore.c
index 665e625fd..8200c2366 100644
--- a/src/peerstore/gnunet-service-peerstore.c
+++ b/src/peerstore/gnunet-service-peerstore.c
@@ -523,11 +523,11 @@ handle_store (void *cls,
record = PEERSTORE_parse_record_message (srm);
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Received a store request. Sub system `%s' Peer `%s Key `%s'
Options: %d.\n",
+ "Received a store request. Sub system `%s' Peer `%s Key `%s'
Options: %u.\n",
record->sub_system,
GNUNET_i2s (record->peer),
record->key,
- ntohl (srm->options));
+ (uint32_t) ntohl (srm->options));
record->client = client;
if (GNUNET_OK !=
db->store_record (db->cls,
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c
index fde0296a4..ef659baa0 100644
--- a/src/revocation/revocation_api.c
+++ b/src/revocation/revocation_api.c
@@ -91,7 +91,7 @@ handle_revocation_query_response (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Revocation query result: %d\n",
- ntohl (qrm->is_valid));
+ (uint32_t) ntohl (qrm->is_valid));
q->func (q->func_cls,
ntohl (qrm->is_valid));
GNUNET_REVOCATION_query_cancel (q);
@@ -225,7 +225,7 @@ handle_revocation_response (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Revocation transmission result: %d\n",
- ntohl (rrm->is_valid));
+ (uint32_t) ntohl (rrm->is_valid));
h->func (h->func_cls,
ntohl (rrm->is_valid));
GNUNET_REVOCATION_revoke_cancel (h);
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c
index c48518f08..30d43e8a1 100644
--- a/src/set/gnunet-service-set.c
+++ b/src/set/gnunet-service-set.c
@@ -781,7 +781,7 @@ handle_incoming_msg (struct Operation *op,
listener = op->listener;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received P2P operation request (op %u, port %s) for active
listener\n",
- ntohl (msg->operation),
+ (uint32_t) ntohl (msg->operation),
GNUNET_h2s (&listener->app_id));
incoming_suggest (op,
listener);
@@ -1075,7 +1075,7 @@ handle_client_create_set (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Client created new set (operation %u)\n",
- ntohl (msg->operation));
+ (uint32_t) ntohl (msg->operation));
if (NULL != set_get (client))
{
/* There can only be one set per client */
@@ -1945,7 +1945,7 @@ handle_client_cancel (void *cls,
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Client requested cancel for op %u\n",
- ntohl (msg->request_id));
+ (uint32_t) ntohl (msg->request_id));
found = GNUNET_NO;
for (op = set->ops_head; NULL != op; op = op->next)
{
@@ -2019,7 +2019,7 @@ handle_client_accept (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Client accepting request %u\n",
- ntohl (msg->accept_reject_id));
+ (uint32_t) ntohl (msg->accept_reject_id));
GNUNET_assert (GNUNET_YES == op->is_incoming);
op->is_incoming = GNUNET_NO;
GNUNET_CONTAINER_DLL_remove (incoming_head,
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (a57e7703f -> 903c035f7), gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 04/14: W32: Fix a possible control flow error, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 12/14: Fix an initialization warning (GCC bug 53119), gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 06/14: W32: Fix wrong format strings, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 10/14: W32: Splice GNUNET_memcpy macro into NAT and GNS helpers, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 09/14: Silence a GCC warning in gnunet-nat.c, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 14/14: W32: Fix msg allocation in gns helper service, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 11/14: W32: cast ntohl() result to uint32_t,
gnunet <=
- [GNUnet-SVN] [gnunet] 01/14: W32: adapt the code to GNUNET_memcpy() that returns nothing, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 02/14: Use GNU printf format, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 05/14: W32: Fix the conditaions for the ifconfig function, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 13/14: W32: port gnunet-gns-import to new zone iterator callback API, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 03/14: Shuffle some vars around to fix a warning, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 07/14: W32: placate GCC by initializing lsocks_write_fd to NULL, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 08/14: Link libgnunetblockgroup to libgnunetblock, gnunet, 2017/02/25