mirror of
https://github.com/curl/curl.git
synced 2026-08-25 00:13:34 +03:00
Enabled a few more gcc warnings with --enable-debug. Renamed a few
variables to avoid shadowing global declarations.
This commit is contained in:
parent
9c5cd6c413
commit
16b95fc773
16 changed files with 102 additions and 98 deletions
|
|
@ -1750,15 +1750,15 @@ int Curl_single_getsock(const struct connectdata *conn,
|
|||
{
|
||||
const struct SessionHandle *data = conn->data;
|
||||
int bitmap = GETSOCK_BLANK;
|
||||
unsigned index = 0;
|
||||
unsigned sockindex = 0;
|
||||
|
||||
if(numsocks < 2)
|
||||
/* simple check but we might need two slots */
|
||||
return GETSOCK_BLANK;
|
||||
|
||||
if(data->reqdata.keep.keepon & KEEP_READ) {
|
||||
bitmap |= GETSOCK_READSOCK(index);
|
||||
sock[index] = conn->sockfd;
|
||||
bitmap |= GETSOCK_READSOCK(sockindex);
|
||||
sock[sockindex] = conn->sockfd;
|
||||
}
|
||||
|
||||
if(data->reqdata.keep.keepon & KEEP_WRITE) {
|
||||
|
|
@ -1768,11 +1768,11 @@ int Curl_single_getsock(const struct connectdata *conn,
|
|||
/* only if they are not the same socket or we didn't have a readable
|
||||
one, we increase index */
|
||||
if(data->reqdata.keep.keepon & KEEP_READ)
|
||||
index++; /* increase index if we need two entries */
|
||||
sock[index] = conn->writesockfd;
|
||||
sockindex++; /* increase index if we need two entries */
|
||||
sock[sockindex] = conn->writesockfd;
|
||||
}
|
||||
|
||||
bitmap |= GETSOCK_WRITESOCK(index);
|
||||
bitmap |= GETSOCK_WRITESOCK(sockindex);
|
||||
}
|
||||
|
||||
return bitmap;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue