diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-07-25 08:42:42 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-07-25 08:42:42 +0000 |
commit | e2210cc509574a93234d8c8b851fe9ed917a4e11 (patch) | |
tree | 08f8b222486c7eee781e4429ed45cceabfbae435 /src/transport/plugin_transport_unix.c | |
parent | 00c4cd3fbb54ef5860c3fa4c13d5318391d61a6e (diff) | |
download | gnunet-e2210cc509574a93234d8c8b851fe9ed917a4e11.tar.gz gnunet-e2210cc509574a93234d8c8b851fe9ed917a4e11.zip |
- coverity 10055
Diffstat (limited to 'src/transport/plugin_transport_unix.c')
-rw-r--r-- | src/transport/plugin_transport_unix.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index 2735d7acc..4ee29a402 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c | |||
@@ -498,7 +498,6 @@ unix_real_send (void *cls, | |||
498 | size_t sbs; | 498 | size_t sbs; |
499 | struct sockaddr_un un; | 499 | struct sockaddr_un un; |
500 | size_t slen; | 500 | size_t slen; |
501 | int retry; | ||
502 | 501 | ||
503 | GNUNET_assert (NULL != plugin); | 502 | GNUNET_assert (NULL != plugin); |
504 | 503 | ||
@@ -540,7 +539,6 @@ unix_real_send (void *cls, | |||
540 | 539 | ||
541 | /* Send the data */ | 540 | /* Send the data */ |
542 | sent = 0; | 541 | sent = 0; |
543 | retry = GNUNET_NO; | ||
544 | sent = GNUNET_NETWORK_socket_sendto (send_handle, msgbuf, msgbuf_size, sb, sbs); | 542 | sent = GNUNET_NETWORK_socket_sendto (send_handle, msgbuf, msgbuf_size, sb, sbs); |
545 | 543 | ||
546 | if ((GNUNET_SYSERR == sent) && ((errno == EAGAIN) || (errno == ENOBUFS))) | 544 | if ((GNUNET_SYSERR == sent) && ((errno == EAGAIN) || (errno == ENOBUFS))) |
@@ -597,7 +595,7 @@ unix_real_send (void *cls, | |||
597 | /* Calling continuation */ | 595 | /* Calling continuation */ |
598 | if (cont != NULL) | 596 | if (cont != NULL) |
599 | { | 597 | { |
600 | if ((sent == GNUNET_SYSERR) && (retry == GNUNET_NO)) | 598 | if (sent == GNUNET_SYSERR) |
601 | cont (cont_cls, target, GNUNET_SYSERR); | 599 | cont (cont_cls, target, GNUNET_SYSERR); |
602 | if (sent > 0) | 600 | if (sent > 0) |
603 | cont (cont_cls, target, GNUNET_OK); | 601 | cont (cont_cls, target, GNUNET_OK); |
@@ -613,11 +611,8 @@ unix_real_send (void *cls, | |||
613 | return -1; | 611 | return -1; |
614 | } | 612 | } |
615 | /* failed and retry: return 0 */ | 613 | /* failed and retry: return 0 */ |
616 | if ((GNUNET_SYSERR == sent) && (retry == GNUNET_YES)) | 614 | if (GNUNET_SYSERR == sent) |
617 | return 0; | 615 | return 0; |
618 | /* failed and no retry: return -1 */ | ||
619 | if ((GNUNET_SYSERR == sent) && (retry == GNUNET_NO)) | ||
620 | return -1; | ||
621 | /* default */ | 616 | /* default */ |
622 | return -1; | 617 | return -1; |
623 | } | 618 | } |