Enabled a few more gcc warnings with --enable-debug. Renamed a few

variables to avoid shadowing global declarations.
This commit is contained in:
Dan Fandrich
2007-09-27 01:45:22 +00:00
parent 9c5cd6c413
commit 16b95fc773
16 changed files with 102 additions and 98 deletions

View File

@@ -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;