diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2020-11-13 23:46:16 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2020-11-13 23:46:16 +0900 |
commit | e19e93df13a84b26db9f129f509ecb74a1b93145 (patch) | |
tree | 264e99934d1661e1d83508c3434c5d00e33a6ee1 /src/transport | |
parent | c185348b6784a80bb8b394e34e3bf447d8dd1f57 (diff) | |
download | gnunet-e19e93df13a84b26db9f129f509ecb74a1b93145.tar.gz gnunet-e19e93df13a84b26db9f129f509ecb74a1b93145.zip |
-warnings mostly format
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/gnunet-helper-transport-wlan.c | 2 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport.c | 3 | ||||
-rw-r--r-- | src/transport/plugin_transport_wlan.c | 9 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/transport/gnunet-helper-transport-wlan.c b/src/transport/gnunet-helper-transport-wlan.c index 83ade115b..f1b190993 100644 --- a/src/transport/gnunet-helper-transport-wlan.c +++ b/src/transport/gnunet-helper-transport-wlan.c | |||
@@ -2004,7 +2004,7 @@ main (int argc, char *argv[]) | |||
2004 | (void) close (dev.fd_raw); | 2004 | (void) close (dev.fd_raw); |
2005 | return 1; | 2005 | return 1; |
2006 | } | 2006 | } |
2007 | strncpy (dev.iface, argv[1], IFNAMSIZ); | 2007 | memcpy (dev.iface, argv[1], IFNAMSIZ); |
2008 | if (0 != open_device_raw (&dev)) | 2008 | if (0 != open_device_raw (&dev)) |
2009 | { | 2009 | { |
2010 | (void) close (dev.fd_raw); | 2010 | (void) close (dev.fd_raw); |
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 92e37a91c..a819d82a5 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -695,12 +695,13 @@ handle_send_transmit_continuation (void *cls, | |||
695 | { | 695 | { |
696 | struct SendTransmitContinuationContext *stcc = cls; | 696 | struct SendTransmitContinuationContext *stcc = cls; |
697 | struct SendOkMessage send_ok_msg; | 697 | struct SendOkMessage send_ok_msg; |
698 | #ifdef ENABLE_TTD | ||
698 | struct GNUNET_TIME_Relative delay; | 699 | struct GNUNET_TIME_Relative delay; |
699 | const struct GNUNET_HELLO_Address *addr; | 700 | const struct GNUNET_HELLO_Address *addr; |
700 | 701 | ||
701 | delay = GNUNET_TIME_absolute_get_duration (stcc->send_time); | 702 | delay = GNUNET_TIME_absolute_get_duration (stcc->send_time); |
702 | addr = GST_neighbour_get_current_address (&stcc->target); | 703 | addr = GST_neighbour_get_current_address (&stcc->target); |
703 | #ifdef ENABLE_TTD | 704 | |
704 | if (delay.rel_value_us > GNUNET_CONSTANTS_LATENCY_WARN.rel_value_us) | 705 | if (delay.rel_value_us > GNUNET_CONSTANTS_LATENCY_WARN.rel_value_us) |
705 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 706 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
706 | "It took us %s to send %u/%u bytes to %s (%d, %s)\n", | 707 | "It took us %s to send %u/%u bytes to %s (%d, %s)\n", |
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index 74b8d5a8a..1b2b6d0d2 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -1436,8 +1436,8 @@ wlan_plugin_send (void *cls, | |||
1436 | char buf[size] GNUNET_ALIGN; | 1436 | char buf[size] GNUNET_ALIGN; |
1437 | 1437 | ||
1438 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1438 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1439 | "Transmitting %u bytes of payload to peer `%s' (starting with %u byte message of type %u)\n", | 1439 | "Transmitting %llu bytes of payload to peer `%s' (starting with %u byte message of type %u)\n", |
1440 | msgbuf_size, | 1440 | (unsigned long long) msgbuf_size, |
1441 | GNUNET_i2s (&session->target), | 1441 | GNUNET_i2s (&session->target), |
1442 | (unsigned int) ntohs (((struct GNUNET_MessageHeader*) msgbuf)->size), | 1442 | (unsigned int) ntohs (((struct GNUNET_MessageHeader*) msgbuf)->size), |
1443 | (unsigned int) ntohs (((struct GNUNET_MessageHeader*) msgbuf)->type)); | 1443 | (unsigned int) ntohs (((struct GNUNET_MessageHeader*) msgbuf)->type)); |
@@ -1871,8 +1871,9 @@ handle_helper_message (void *cls, | |||
1871 | if (msize < sizeof(struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage)) | 1871 | if (msize < sizeof(struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage)) |
1872 | { | 1872 | { |
1873 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1873 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1874 | "Size of packet is too small (%u bytes < %u)\n", | 1874 | "Size of packet is too small (%llu bytes < %llu)\n", |
1875 | msize, sizeof(struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage)); | 1875 | (unsigned long long) msize, |
1876 | (unsigned long long) sizeof(struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage)); | ||
1876 | break; | 1877 | break; |
1877 | } | 1878 | } |
1878 | rxinfo = (const struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage *) hdr; | 1879 | rxinfo = (const struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage *) hdr; |