[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 20/264: select: fix 'pending_ms' is assigned a value that is nev
From: |
gnunet |
Subject: |
[gnurl] 20/264: select: fix 'pending_ms' is assigned a value that is never used |
Date: |
Thu, 30 Apr 2020 16:05:23 +0200 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit 041e778f1e864f57d98757704378acb14c9d873e
Author: Marc Hoersken <address@hidden>
AuthorDate: Thu Mar 12 09:32:50 2020 +0100
select: fix 'pending_ms' is assigned a value that is never used
Detected by Codacy
---
lib/select.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/select.c b/lib/select.c
index b9d7d6569..bbada45fc 100644
--- a/lib/select.c
+++ b/lib/select.c
@@ -119,7 +119,7 @@ int Curl_select(curl_socket_t maxfd,
{
struct timeval pending_tv;
struct timeval *ptimeout;
- int pending_ms = 0;
+ int pending_ms;
int r;
#ifdef USE_WINSOCK
@@ -197,7 +197,7 @@ int Curl_socket_check(curl_socket_t readfd0, /* two sockets
to read from */
{
#ifdef HAVE_POLL_FINE
struct pollfd pfd[3];
- int pending_ms = 0;
+ int pending_ms;
int num;
#else
fd_set fds_read;
@@ -252,7 +252,7 @@ int Curl_socket_check(curl_socket_t readfd0, /* two sockets
to read from */
pending_ms = (int)timeout_ms;
else if(timeout_ms < 0)
pending_ms = -1;
- else if(!timeout_ms)
+ else
pending_ms = 0;
r = poll(pfd, num, pending_ms);
@@ -374,7 +374,7 @@ int Curl_socket_check(curl_socket_t readfd0, /* two sockets
to read from */
int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
{
#ifdef HAVE_POLL_FINE
- int pending_ms = 0;
+ int pending_ms;
#else
fd_set fds_read;
fd_set fds_write;
@@ -409,7 +409,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int
timeout_ms)
pending_ms = timeout_ms;
else if(timeout_ms < 0)
pending_ms = -1;
- else if(!timeout_ms)
+ else
pending_ms = 0;
r = poll(ufds, nfds, pending_ms);
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 08/264: cleanup: fix some text/comment typos, (continued)
- [gnurl] 08/264: cleanup: fix some text/comment typos, gnunet, 2020/04/30
- [gnurl] 05/264: tests/data: Fix some XML formatting issues in test cases, gnunet, 2020/04/30
- [gnurl] 11/264: server/getpart: make the "XML-parser" stricter, gnunet, 2020/04/30
- [gnurl] 13/264: easy: Fix curl_easy_duphandle for builds missing IPv6 that use c-ares, gnunet, 2020/04/30
- [gnurl] 17/264: ci/tests: fix and align setting TFLAGS for make test-nonflaky, gnunet, 2020/04/30
- [gnurl] 14/264: Makefile.m32: Improve windres parameter compatibility, gnunet, 2020/04/30
- [gnurl] 19/264: select: move duplicate select preparation code into Curl_select, gnunet, 2020/04/30
- [gnurl] 24/264: tests/README: add note about manually installing python-impacket, gnunet, 2020/04/30
- [gnurl] 23/264: transfer: cap retries of "dead connections" to 5, gnunet, 2020/04/30
- [gnurl] 25/264: ci/tests: install impacket for SMB tests on FreeBSD using CirrusCI, gnunet, 2020/04/30
- [gnurl] 20/264: select: fix 'pending_ms' is assigned a value that is never used,
gnunet <=
- [gnurl] 27/264: gskit: use our internal select wrapper for portability, gnunet, 2020/04/30
- [gnurl] 29/264: ci/tests: fix Azure Pipelines not running for pull requests, gnunet, 2020/04/30
- [gnurl] 28/264: gskit: update the copyright year range, gnunet, 2020/04/30
- [gnurl] 31/264: tool_operate: fix add_parallel_transfers when more are in queue, gnunet, 2020/04/30
- [gnurl] 38/264: writeout_json: add missing comma to fix the HTTP version, gnunet, 2020/04/30
- [gnurl] 18/264: connect: happy eyeballs cleanup, gnunet, 2020/04/30
- [gnurl] 26/264: tests: fix verification of stdout in test 1452 due to newline, gnunet, 2020/04/30
- [gnurl] 35/264: CI: stop ignoring 323, it is disabled, gnunet, 2020/04/30
- [gnurl] 36/264: writeout: support to generate JSON output, gnunet, 2020/04/30
- [gnurl] 32/264: cmake: add support for building with wolfSSL, gnunet, 2020/04/30