aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/file.c6
-rw-r--r--lib/formdata.c8
-rw-r--r--lib/ftp.c14
-rw-r--r--lib/http_ntlm.c26
-rw-r--r--lib/multi.c6
-rw-r--r--lib/sendf.c6
-rw-r--r--lib/splay.c22
-rw-r--r--lib/splay.h2
-rw-r--r--lib/transfer.c12
-rw-r--r--lib/url.c50
-rw-r--r--lib/url.h6
11 files changed, 79 insertions, 79 deletions
diff --git a/lib/file.c b/lib/file.c
index 0478d3ebd..88d6bf26a 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -373,12 +373,12 @@ CURLcode Curl_file(struct connectdata *conn, bool *done)
if(fstated) {
const struct tm *tm;
- time_t clock = (time_t)statbuf.st_mtime;
+ time_t filetime = (time_t)statbuf.st_mtime;
#ifdef HAVE_GMTIME_R
struct tm buffer;
- tm = (const struct tm *)gmtime_r(&clock, &buffer);
+ tm = (const struct tm *)gmtime_r(&filetime, &buffer);
#else
- tm = gmtime(&clock);
+ tm = gmtime(&filetime);
#endif
/* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
snprintf(buf, BUFSIZE-1,
diff --git a/lib/formdata.c b/lib/formdata.c
index 64414f57b..05cfd3cc8 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -950,21 +950,21 @@ int curl_formget(struct curl_httppost *form, void *arg,
for (ptr = data; ptr; ptr = ptr->next) {
if (ptr->type == FORM_FILE) {
char buffer[8192];
- size_t read;
+ size_t nread;
struct Form temp;
Curl_FormInit(&temp, ptr);
do {
- read = readfromfile(&temp, buffer, sizeof(buffer));
- if ((read == (size_t) -1) || (read != append(arg, buffer, read))) {
+ nread = readfromfile(&temp, buffer, sizeof(buffer));
+ if ((nread == (size_t) -1) || (nread != append(arg, buffer, nread))) {
if (temp.fp) {
fclose(temp.fp);
}
Curl_formclean(&data);
return -1;
}
- } while (read == sizeof(buffer));
+ } while (nread == sizeof(buffer));
} else {
if (ptr->length != append(arg, ptr->line, ptr->length)) {
Curl_formclean(&data);
diff --git a/lib/ftp.c b/lib/ftp.c
index b2122fa6b..56eb0ec75 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -633,7 +633,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
/* This is the ONLY way to change FTP state! */
static void state(struct connectdata *conn,
- ftpstate state)
+ ftpstate newstate)
{
#if defined(CURLDEBUG) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
/* for debug purposes */
@@ -674,11 +674,11 @@ static void state(struct connectdata *conn,
#endif
struct ftp_conn *ftpc = &conn->proto.ftpc;
#if defined(CURLDEBUG) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
- if(ftpc->state != state)
+ if(ftpc->state != newstate)
infof(conn->data, "FTP %p state change from %s to %s\n",
- ftpc, names[ftpc->state], names[state]);
+ ftpc, names[ftpc->state], names[newstate]);
#endif
- ftpc->state = state;
+ ftpc->state = newstate;
}
static CURLcode ftp_state_user(struct connectdata *conn)
@@ -1882,12 +1882,12 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn,
data->set.get_filetime &&
(data->info.filetime>=0) ) {
struct tm *tm;
- time_t clock = (time_t)data->info.filetime;
+ time_t filetime = (time_t)data->info.filetime;
#ifdef HAVE_GMTIME_R
struct tm buffer;
- tm = (struct tm *)gmtime_r(&clock, &buffer);
+ tm = (struct tm *)gmtime_r(&filetime, &buffer);
#else
- tm = gmtime(&clock);
+ tm = gmtime(&filetime);
#endif
/* format: "Tue, 15 Nov 1994 12:45:26" */
snprintf(buf, BUFSIZE-1,
diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c
index 2dda4d069..b1f557e23 100644
--- a/lib/http_ntlm.c
+++ b/lib/http_ntlm.c
@@ -443,11 +443,11 @@ static CURLcode mk_nt_hash(struct SessionHandle *data,
{
/* Create NT hashed password. */
- MD4_CTX MD4;
+ MD4_CTX MD4pw;
- MD4_Init(&MD4);
- MD4_Update(&MD4, pw, 2*len);
- MD4_Final(ntbuffer, &MD4);
+ MD4_Init(&MD4pw);
+ MD4_Update(&MD4pw, pw, 2*len);
+ MD4_Final(ntbuffer, &MD4pw);
memset(ntbuffer + 16, 0, 21 - 16);
}
@@ -857,25 +857,25 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
unsigned char ntbuffer[0x18];
unsigned char tmp[0x18];
unsigned char md5sum[MD5_DIGEST_LENGTH];
- MD5_CTX MD5;
- unsigned char random[8];
+ MD5_CTX MD5pw;
+ unsigned char entropy[8];
/* Need to create 8 bytes random data */
Curl_ossl_seed(conn->data); /* Initiate the seed if not already done */
- RAND_bytes(random,8);
+ RAND_bytes(entropy,8);
/* 8 bytes random data as challenge in lmresp */
- memcpy(lmresp,random,8);
+ memcpy(lmresp,entropy,8);
/* Pad with zeros */
memset(lmresp+8,0,0x10);
- /* Fill tmp with challenge(nonce?) + random */
+ /* Fill tmp with challenge(nonce?) + entropy */
memcpy(tmp,&ntlm->nonce[0],8);
- memcpy(tmp+8,random,8);
+ memcpy(tmp+8,entropy,8);
- MD5_Init(&MD5);
- MD5_Update(&MD5, tmp, 16);
- MD5_Final(md5sum, &MD5);
+ MD5_Init(&MD5pw);
+ MD5_Update(&MD5pw, tmp, 16);
+ MD5_Final(md5sum, &MD5pw);
/* We shall only use the first 8 bytes of md5sum,
but the des code in lm_resp only encrypt the first 8 bytes */
if (mk_nt_hash(conn->data, passwdp, ntbuffer) == CURLE_OUT_OF_MEMORY)
diff --git a/lib/multi.c b/lib/multi.c
index 95544e662..f9fcac12e 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -218,7 +218,7 @@ void curl_multi_dump(CURLM *multi_handle);
static void multistate(struct Curl_one_easy *easy, CURLMstate state)
{
#ifdef CURLDEBUG
- long index = -5000;
+ long connectindex = -5000;
#endif
CURLMstate oldstate = easy->state;
@@ -231,12 +231,12 @@ static void multistate(struct Curl_one_easy *easy, CURLMstate state)
#ifdef CURLDEBUG
if(easy->state > CURLM_STATE_CONNECT &&
easy->state < CURLM_STATE_COMPLETED)
- index = easy->easy_conn->connectindex;
+ connectindex = easy->easy_conn->connectindex;
infof(easy->easy_handle,
"STATE: %s => %s handle %p; (connection #%ld) \n",
statename[oldstate], statename[easy->state],
- (char *)easy, index);
+ (char *)easy, connectindex);
#endif
if(state == CURLM_STATE_COMPLETED)
/* changing to COMPLETED means there's one less easy handle 'alive' */
diff --git a/lib/sendf.c b/lib/sendf.c
index 9774ca0e5..5aa0e5dac 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -93,10 +93,10 @@ struct curl_slist *curl_slist_append(struct curl_slist *list,
new_item = (struct curl_slist *) malloc(sizeof(struct curl_slist));
if (new_item) {
- char *dup = strdup(data);
- if(dup) {
+ char *dupdata = strdup(data);
+ if(dupdata) {
new_item->next = NULL;
- new_item->data = dup;
+ new_item->data = dupdata;
}
else {
free(new_item);
diff --git a/lib/splay.c b/lib/splay.c
index f5542af4c..53b13d74a 100644
--- a/lib/splay.c
+++ b/lib/splay.c
@@ -260,34 +260,34 @@ struct Curl_tree *Curl_splaygetbest(int i, struct Curl_tree *t,
'newroot' will be made to point to NULL.
*/
int Curl_splayremovebyaddr(struct Curl_tree *t,
- struct Curl_tree *remove,
+ struct Curl_tree *removenode,
struct Curl_tree **newroot)
{
struct Curl_tree *x;
- if (!t || !remove)
+ if (!t || !removenode)
return 1;
- if(KEY_NOTUSED == remove->key) {
+ if(KEY_NOTUSED == removenode->key) {
/* Key set to NOTUSED means it is a subnode within a 'same' linked list
and thus we can unlink it easily. The 'smaller' link of a subnode
links to the parent node. */
- if (remove->smaller == NULL)
+ if (removenode->smaller == NULL)
return 3;
- remove->smaller->same = remove->same;
- if(remove->same)
- remove->same->smaller = remove->smaller;
+ removenode->smaller->same = removenode->same;
+ if(removenode->same)
+ removenode->same->smaller = removenode->smaller;
/* Ensures that double-remove gets caught. */
- remove->smaller = NULL;
+ removenode->smaller = NULL;
/* voila, we're done! */
*newroot = t; /* return the same root */
return 0;
}
- t = Curl_splay(remove->key, t);
+ t = Curl_splay(removenode->key, t);
/* First make sure that we got the same root node as the one we want
to remove, as otherwise we might be trying to remove a node that
@@ -296,7 +296,7 @@ int Curl_splayremovebyaddr(struct Curl_tree *t,
We cannot just compare the keys here as a double remove in quick
succession of a node with key != KEY_NOTUSED && same != NULL
could return the same key but a different node. */
- if(t != remove)
+ if(t != removenode)
return 2;
/* Check if there is a list with identical sizes, as then we're trying to
@@ -315,7 +315,7 @@ int Curl_splayremovebyaddr(struct Curl_tree *t,
if (t->smaller == NULL)
x = t->larger;
else {
- x = Curl_splay(remove->key, t->smaller);
+ x = Curl_splay(removenode->key, t->smaller);
x->larger = t->larger;
}
}
diff --git a/lib/splay.h b/lib/splay.h
index 16745341e..6e9191a63 100644
--- a/lib/splay.h
+++ b/lib/splay.h
@@ -42,7 +42,7 @@ struct Curl_tree *Curl_splayremove(int key, struct Curl_tree *t,
struct Curl_tree *Curl_splaygetbest(int key, struct Curl_tree *t,
struct Curl_tree **removed);
int Curl_splayremovebyaddr(struct Curl_tree *t,
- struct Curl_tree *remove,
+ struct Curl_tree *removenode,
struct Curl_tree **newroot);
#ifdef CURLDEBUG
diff --git a/lib/transfer.c b/lib/transfer.c
index 29e53690b..7fa88040e 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -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;
diff --git a/lib/url.c b/lib/url.c
index 6735b0179..878c92d44 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -161,9 +161,9 @@ static bool IsPipeliningPossible(const struct SessionHandle *handle);
static bool IsPipeliningEnabled(const struct SessionHandle *handle);
static void conn_free(struct connectdata *conn);
-static void signalPipeClose(struct curl_llist *pipe);
+static void signalPipeClose(struct curl_llist *pipeline);
-static struct SessionHandle* gethandleathead(struct curl_llist *pipe);
+static struct SessionHandle* gethandleathead(struct curl_llist *pipeline);
#define MAX_PIPELINE_LENGTH 5
@@ -292,7 +292,7 @@ CURLcode Curl_close(struct SessionHandle *data)
if(data->state.connc && data->state.connc->type == CONNCACHE_MULTI) {
struct conncache *c = data->state.connc;
long i;
- struct curl_llist *pipe;
+ struct curl_llist *pipeline;
struct curl_llist_element *curr;
struct connectdata *connptr;
@@ -301,9 +301,9 @@ CURLcode Curl_close(struct SessionHandle *data)
if(!connptr)
continue;
- pipe = connptr->send_pipe;
- if(pipe) {
- for (curr = pipe->head; curr; curr=curr->next) {
+ pipeline = connptr->send_pipe;
+ if(pipeline) {
+ for (curr = pipeline->head; curr; curr=curr->next) {
if(data == (struct SessionHandle *) curr->ptr) {
fprintf(stderr,
"MAJOR problem we %p are still in send pipe for %p done %d\n",
@@ -311,9 +311,9 @@ CURLcode Curl_close(struct SessionHandle *data)
}
}
}
- pipe = connptr->recv_pipe;
- if(pipe) {
- for (curr = pipe->head; curr; curr=curr->next) {
+ pipeline = connptr->recv_pipe;
+ if(pipeline) {
+ for (curr = pipeline->head; curr; curr=curr->next) {
if(data == (struct SessionHandle *) curr->ptr) {
fprintf(stderr,
"MAJOR problem we %p are still in recv pipe for %p done %d\n",
@@ -2036,30 +2036,30 @@ static bool IsPipeliningEnabled(const struct SessionHandle *handle)
}
CURLcode Curl_addHandleToPipeline(struct SessionHandle *data,
- struct curl_llist *pipe)
+ struct curl_llist *pipeline)
{
#ifdef CURLDEBUG
if(!IsPipeliningPossible(data)) {
/* when not pipelined, there MUST be no handle in the list already */
- if(pipe->head)
+ if(pipeline->head)
infof(data, "PIPE when no PIPE supposed!\n");
}
#endif
- if (!Curl_llist_insert_next(pipe, pipe->tail, data))
+ if (!Curl_llist_insert_next(pipeline, pipeline->tail, data))
return CURLE_OUT_OF_MEMORY;
return CURLE_OK;
}
int Curl_removeHandleFromPipeline(struct SessionHandle *handle,
- struct curl_llist *pipe)
+ struct curl_llist *pipeline)
{
struct curl_llist_element *curr;
- curr = pipe->head;
+ curr = pipeline->head;
while (curr) {
if (curr->ptr == handle) {
- Curl_llist_remove(pipe, curr, NULL);
+ Curl_llist_remove(pipeline, curr, NULL);
return 1; /* we removed a handle */
}
curr = curr->next;
@@ -2069,11 +2069,11 @@ int Curl_removeHandleFromPipeline(struct SessionHandle *handle,
}
#if 0 /* this code is saved here as it is useful for debugging purposes */
-static void Curl_printPipeline(struct curl_llist *pipe)
+static void Curl_printPipeline(struct curl_llist *pipeline)
{
struct curl_llist_element *curr;
- curr = pipe->head;
+ curr = pipeline->head;
while (curr) {
struct SessionHandle *data = (struct SessionHandle *) curr->ptr;
infof(data, "Handle in pipeline: %s\n", data->reqdata.path);
@@ -2083,9 +2083,9 @@ static void Curl_printPipeline(struct curl_llist *pipe)
#endif
bool Curl_isHandleAtHead(struct SessionHandle *handle,
- struct curl_llist *pipe)
+ struct curl_llist *pipeline)
{
- struct curl_llist_element *curr = pipe->head;
+ struct curl_llist_element *curr = pipeline->head;
if (curr) {
return (bool)(curr->ptr == handle);
}
@@ -2093,9 +2093,9 @@ bool Curl_isHandleAtHead(struct SessionHandle *handle,
return FALSE;
}
-static struct SessionHandle* gethandleathead(struct curl_llist *pipe)
+static struct SessionHandle* gethandleathead(struct curl_llist *pipeline)
{
- struct curl_llist_element *curr = pipe->head;
+ struct curl_llist_element *curr = pipeline->head;
if (curr) {
return (struct SessionHandle *) curr->ptr;
}
@@ -2103,14 +2103,14 @@ static struct SessionHandle* gethandleathead(struct curl_llist *pipe)
return NULL;
}
-static void signalPipeClose(struct curl_llist *pipe)
+static void signalPipeClose(struct curl_llist *pipeline)
{
struct curl_llist_element *curr;
- if (!pipe)
+ if (!pipeline)
return;
- curr = pipe->head;
+ curr = pipeline->head;
while (curr) {
struct curl_llist_element *next = curr->next;
struct SessionHandle *data = (struct SessionHandle *) curr->ptr;
@@ -2124,7 +2124,7 @@ static void signalPipeClose(struct curl_llist *pipe)
data->state.pipe_broke = TRUE;
Curl_multi_handlePipeBreak(data);
- Curl_llist_remove(pipe, curr, NULL);
+ Curl_llist_remove(pipeline, curr, NULL);
curr = next;
}
}
diff --git a/lib/url.h b/lib/url.h
index 0431cb065..d7a75e0a5 100644
--- a/lib/url.h
+++ b/lib/url.h
@@ -65,11 +65,11 @@ int Curl_doing_getsock(struct connectdata *conn,
int numsocks);
CURLcode Curl_addHandleToPipeline(struct SessionHandle *handle,
- struct curl_llist *pipe);
+ struct curl_llist *pipeline);
int Curl_removeHandleFromPipeline(struct SessionHandle *handle,
- struct curl_llist *pipe);
+ struct curl_llist *pipeline);
bool Curl_isHandleAtHead(struct SessionHandle *handle,
- struct curl_llist *pipe);
+ struct curl_llist *pipeline);
void Curl_close_connections(struct SessionHandle *data);