diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-08-19 07:47:56 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-08-19 07:47:56 +0000 |
commit | 1e977172cabfffd4fe774b2f13101247bb0e720c (patch) | |
tree | 31675ba3ba6c1f801882ed21c20340b508d2a064 /src | |
parent | bf7f0f51764c29f82be5aeae84dd95de7a857cd3 (diff) | |
download | gnunet-1e977172cabfffd4fe774b2f13101247bb0e720c.tar.gz gnunet-1e977172cabfffd4fe774b2f13101247bb0e720c.zip |
remove dead assignments
Diffstat (limited to 'src')
-rw-r--r-- | src/transport/gnunet-helper-transport-wlan-dummy.c | 4 | ||||
-rw-r--r-- | src/transport/gnunet-helper-transport-wlan.c | 4 | ||||
-rw-r--r-- | src/transport/plugin_transport_http_common.c | 3 | ||||
-rw-r--r-- | src/transport/plugin_transport_http_server.c | 4 | ||||
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 4 | ||||
-rw-r--r-- | src/transport/plugin_transport_udp.c | 5 | ||||
-rw-r--r-- | src/transport/plugin_transport_udp_broadcasting.c | 3 | ||||
-rw-r--r-- | src/transport/plugin_transport_unix.c | 3 |
8 files changed, 10 insertions, 20 deletions
diff --git a/src/transport/gnunet-helper-transport-wlan-dummy.c b/src/transport/gnunet-helper-transport-wlan-dummy.c index a7015ac2c..1e48d17e7 100644 --- a/src/transport/gnunet-helper-transport-wlan-dummy.c +++ b/src/transport/gnunet-helper-transport-wlan-dummy.c | |||
@@ -263,7 +263,7 @@ main (int argc, char *argv[]) | |||
263 | } | 263 | } |
264 | if (NULL == (fpout = fopen (FIFO_FILE2, "w"))) | 264 | if (NULL == (fpout = fopen (FIFO_FILE2, "w"))) |
265 | { | 265 | { |
266 | erg = mkfifo (FIFO_FILE2, 0666); | 266 | mkfifo (FIFO_FILE2, 0666); |
267 | fpout = fopen (FIFO_FILE2, "w"); | 267 | fpout = fopen (FIFO_FILE2, "w"); |
268 | } | 268 | } |
269 | if (NULL == fpout) | 269 | if (NULL == fpout) |
@@ -277,7 +277,7 @@ main (int argc, char *argv[]) | |||
277 | first = 0; | 277 | first = 0; |
278 | if (NULL == (fpout = fopen (FIFO_FILE1, "w"))) | 278 | if (NULL == (fpout = fopen (FIFO_FILE1, "w"))) |
279 | { | 279 | { |
280 | erg = mkfifo (FIFO_FILE1, 0666); | 280 | mkfifo (FIFO_FILE1, 0666); |
281 | fpout = fopen (FIFO_FILE1, "w"); | 281 | fpout = fopen (FIFO_FILE1, "w"); |
282 | } | 282 | } |
283 | if (NULL == fpout) | 283 | if (NULL == fpout) |
diff --git a/src/transport/gnunet-helper-transport-wlan.c b/src/transport/gnunet-helper-transport-wlan.c index 3ad4d64c4..b23f43dde 100644 --- a/src/transport/gnunet-helper-transport-wlan.c +++ b/src/transport/gnunet-helper-transport-wlan.c | |||
@@ -1482,7 +1482,7 @@ linux_read (struct HardwareInfos *dev, | |||
1482 | if (PRISM_STATUS_OK == pv.status) | 1482 | if (PRISM_STATUS_OK == pv.status) |
1483 | { | 1483 | { |
1484 | ri->ri_noise = pv.data; | 1484 | ri->ri_noise = pv.data; |
1485 | got_noise = 1; | 1485 | /* got_noise = 1; */ |
1486 | } | 1486 | } |
1487 | break; | 1487 | break; |
1488 | case PRISM_DID_RATE: | 1488 | case PRISM_DID_RATE: |
@@ -1504,7 +1504,7 @@ linux_read (struct HardwareInfos *dev, | |||
1504 | if (PRISM_STATUS_OK == pv.status) | 1504 | if (PRISM_STATUS_OK == pv.status) |
1505 | { | 1505 | { |
1506 | ri->ri_power = pv.data; | 1506 | ri->ri_power = pv.data; |
1507 | got_signal = 1; | 1507 | /* got_signal = 1; */ |
1508 | } | 1508 | } |
1509 | break; | 1509 | break; |
1510 | } | 1510 | } |
diff --git a/src/transport/plugin_transport_http_common.c b/src/transport/plugin_transport_http_common.c index 4c64d2bf7..7a7f9ad0c 100644 --- a/src/transport/plugin_transport_http_common.c +++ b/src/transport/plugin_transport_http_common.c | |||
@@ -320,7 +320,6 @@ http_common_plugin_string_to_address (void *cls, | |||
320 | address = NULL; | 320 | address = NULL; |
321 | plugin = NULL; | 321 | plugin = NULL; |
322 | optionstr = NULL; | 322 | optionstr = NULL; |
323 | options = 0; | ||
324 | if ((NULL == addr) || (addrlen == 0)) | 323 | if ((NULL == addr) || (addrlen == 0)) |
325 | { | 324 | { |
326 | GNUNET_break (0); | 325 | GNUNET_break (0); |
@@ -346,7 +345,7 @@ http_common_plugin_string_to_address (void *cls, | |||
346 | } | 345 | } |
347 | optionstr[0] = '\0'; | 346 | optionstr[0] = '\0'; |
348 | optionstr ++; | 347 | optionstr ++; |
349 | options = atol (optionstr); | 348 | options = atol (optionstr); /* 0 on conversion error, that's ok */ |
350 | address = strchr (optionstr, '.'); | 349 | address = strchr (optionstr, '.'); |
351 | if (NULL == address) | 350 | if (NULL == address) |
352 | { | 351 | { |
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index 56477625f..abf3fdacd 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c | |||
@@ -1424,7 +1424,7 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection, | |||
1424 | response = MHD_create_response_from_data (strlen ("Thank you!"), | 1424 | response = MHD_create_response_from_data (strlen ("Thank you!"), |
1425 | "Thank you!", | 1425 | "Thank you!", |
1426 | MHD_NO, MHD_NO); | 1426 | MHD_NO, MHD_NO); |
1427 | res = MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); | 1427 | MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); |
1428 | MHD_destroy_response (response); | 1428 | MHD_destroy_response (response); |
1429 | return MHD_YES; | 1429 | return MHD_YES; |
1430 | } | 1430 | } |
@@ -1472,7 +1472,7 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection, | |||
1472 | response = MHD_create_response_from_data (strlen ("Thank you!"), | 1472 | response = MHD_create_response_from_data (strlen ("Thank you!"), |
1473 | "Thank you!", | 1473 | "Thank you!", |
1474 | MHD_NO, MHD_NO); | 1474 | MHD_NO, MHD_NO); |
1475 | res = MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); | 1475 | MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); |
1476 | MHD_destroy_response (response); | 1476 | MHD_destroy_response (response); |
1477 | return MHD_YES; | 1477 | return MHD_YES; |
1478 | } | 1478 | } |
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index b1c4cab2b..37a4aa7cd 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -597,7 +597,6 @@ tcp_address_to_string (void *cls, const void *addr, size_t addrlen) | |||
597 | uint16_t port; | 597 | uint16_t port; |
598 | uint32_t options; | 598 | uint32_t options; |
599 | 599 | ||
600 | options = 0; | ||
601 | switch (addrlen) | 600 | switch (addrlen) |
602 | { | 601 | { |
603 | case sizeof (struct IPv6TcpAddress): | 602 | case sizeof (struct IPv6TcpAddress): |
@@ -665,7 +664,6 @@ tcp_string_to_address (void *cls, const char *addr, uint16_t addrlen, | |||
665 | address = NULL; | 664 | address = NULL; |
666 | plugin = NULL; | 665 | plugin = NULL; |
667 | optionstr = NULL; | 666 | optionstr = NULL; |
668 | options = 0; | ||
669 | if ((NULL == addr) || (addrlen == 0)) | 667 | if ((NULL == addr) || (addrlen == 0)) |
670 | { | 668 | { |
671 | GNUNET_break (0); | 669 | GNUNET_break (0); |
@@ -1735,8 +1733,6 @@ tcp_plugin_address_pretty_printer (void *cls, const char *type, | |||
1735 | uint16_t port; | 1733 | uint16_t port; |
1736 | uint32_t options; | 1734 | uint32_t options; |
1737 | 1735 | ||
1738 | |||
1739 | options = 0; | ||
1740 | if (addrlen == sizeof (struct IPv6TcpAddress)) | 1736 | if (addrlen == sizeof (struct IPv6TcpAddress)) |
1741 | { | 1737 | { |
1742 | t6 = addr; | 1738 | t6 = addr; |
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 46804ba1d..90053b575 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -559,7 +559,6 @@ udp_address_to_string (void *cls, const void *addr, size_t addrlen) | |||
559 | uint16_t port; | 559 | uint16_t port; |
560 | uint32_t options; | 560 | uint32_t options; |
561 | 561 | ||
562 | options = 0; | ||
563 | if (addrlen == sizeof (struct IPv6UdpAddress)) | 562 | if (addrlen == sizeof (struct IPv6UdpAddress)) |
564 | { | 563 | { |
565 | t6 = addr; | 564 | t6 = addr; |
@@ -622,7 +621,7 @@ udp_string_to_address (void *cls, const char *addr, uint16_t addrlen, | |||
622 | address = NULL; | 621 | address = NULL; |
623 | plugin = NULL; | 622 | plugin = NULL; |
624 | optionstr = NULL; | 623 | optionstr = NULL; |
625 | options = 0; | 624 | |
626 | if ((NULL == addr) || (addrlen == 0)) | 625 | if ((NULL == addr) || (addrlen == 0)) |
627 | { | 626 | { |
628 | GNUNET_break (0); | 627 | GNUNET_break (0); |
@@ -795,7 +794,6 @@ udp_plugin_address_pretty_printer (void *cls, const char *type, | |||
795 | uint16_t port; | 794 | uint16_t port; |
796 | uint32_t options; | 795 | uint32_t options; |
797 | 796 | ||
798 | options = 0; | ||
799 | if (addrlen == sizeof (struct IPv6UdpAddress)) | 797 | if (addrlen == sizeof (struct IPv6UdpAddress)) |
800 | { | 798 | { |
801 | u6 = addr; | 799 | u6 = addr; |
@@ -1256,7 +1254,6 @@ disconnect_session (struct Session *s) | |||
1256 | call_continuation(udpw, GNUNET_SYSERR); | 1254 | call_continuation(udpw, GNUNET_SYSERR); |
1257 | GNUNET_free (udpw); | 1255 | GNUNET_free (udpw); |
1258 | } | 1256 | } |
1259 | udpw = next; | ||
1260 | } | 1257 | } |
1261 | plugin->env->session_end (plugin->env->cls, &s->target, s); | 1258 | plugin->env->session_end (plugin->env->cls, &s->target, s); |
1262 | 1259 | ||
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c index 4b220d156..1f26706d4 100644 --- a/src/transport/plugin_transport_udp_broadcasting.c +++ b/src/transport/plugin_transport_udp_broadcasting.c | |||
@@ -272,7 +272,7 @@ udp_ipv4_broadcast_send (void *cls, | |||
272 | plugin->send_ipv4_broadcast_task = GNUNET_SCHEDULER_NO_TASK; | 272 | plugin->send_ipv4_broadcast_task = GNUNET_SCHEDULER_NO_TASK; |
273 | 273 | ||
274 | msg_size = prepare_beacon(plugin, (struct UDP_Beacon_Message *) &buf); | 274 | msg_size = prepare_beacon(plugin, (struct UDP_Beacon_Message *) &buf); |
275 | sent = 0; | 275 | |
276 | baddr = plugin->ipv4_broadcast_head; | 276 | baddr = plugin->ipv4_broadcast_head; |
277 | /* just IPv4 */ | 277 | /* just IPv4 */ |
278 | while ((msg_size > 0) && (baddr != NULL) && (baddr->addrlen == sizeof (struct sockaddr_in))) | 278 | while ((msg_size > 0) && (baddr != NULL) && (baddr->addrlen == sizeof (struct sockaddr_in))) |
@@ -324,7 +324,6 @@ udp_ipv6_broadcast_send (void *cls, | |||
324 | plugin->send_ipv6_broadcast_task = GNUNET_SCHEDULER_NO_TASK; | 324 | plugin->send_ipv6_broadcast_task = GNUNET_SCHEDULER_NO_TASK; |
325 | 325 | ||
326 | msg_size = prepare_beacon(plugin, (struct UDP_Beacon_Message *) &buf); | 326 | msg_size = prepare_beacon(plugin, (struct UDP_Beacon_Message *) &buf); |
327 | sent = 0; | ||
328 | sent = GNUNET_NETWORK_socket_sendto (plugin->sockv6, &buf, msg_size, | 327 | sent = GNUNET_NETWORK_socket_sendto (plugin->sockv6, &buf, msg_size, |
329 | (const struct sockaddr *) | 328 | (const struct sockaddr *) |
330 | &plugin->ipv6_multicast_address, | 329 | &plugin->ipv6_multicast_address, |
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index 211408f18..5cf9c5125 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c | |||
@@ -610,7 +610,6 @@ unix_real_send (void *cls, | |||
610 | 610 | ||
611 | resend: | 611 | resend: |
612 | /* Send the data */ | 612 | /* Send the data */ |
613 | sent = 0; | ||
614 | sent = GNUNET_NETWORK_socket_sendto (send_handle, msgbuf, msgbuf_size, sb, sbs); | 613 | sent = GNUNET_NETWORK_socket_sendto (send_handle, msgbuf, msgbuf_size, sb, sbs); |
615 | 614 | ||
616 | if (GNUNET_SYSERR == sent) | 615 | if (GNUNET_SYSERR == sent) |
@@ -1440,7 +1439,7 @@ unix_string_to_address (void *cls, const char *addr, uint16_t addrlen, | |||
1440 | address = NULL; | 1439 | address = NULL; |
1441 | plugin = NULL; | 1440 | plugin = NULL; |
1442 | optionstr = NULL; | 1441 | optionstr = NULL; |
1443 | options = 0; | 1442 | |
1444 | if ((NULL == addr) || (addrlen == 0)) | 1443 | if ((NULL == addr) || (addrlen == 0)) |
1445 | { | 1444 | { |
1446 | GNUNET_break (0); | 1445 | GNUNET_break (0); |