summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tool_easysrc.c16
-rw-r--r--src/tool_formparse.c4
-rw-r--r--src/tool_getparam.c8
-rw-r--r--src/tool_operate.c4
-rw-r--r--src/tool_paramhlp.c2
-rw-r--r--src/tool_parsecfg.c4
-rw-r--r--src/tool_setopt.c20
-rw-r--r--src/tool_urlglob.c10
8 files changed, 34 insertions, 34 deletions
diff --git a/src/tool_easysrc.c b/src/tool_easysrc.c
index 602409d14..cb30e404b 100644
--- a/src/tool_easysrc.c
+++ b/src/tool_easysrc.c
@@ -141,11 +141,11 @@ CURLcode easysrc_perform(void)
const char *c;
CHKRET(easysrc_add(&easysrc_code, ""));
/* Preamble comment */
- for(i=0; ((c = srchard[i]) != NULL); i++)
+ for(i = 0; ((c = srchard[i]) != NULL); i++)
CHKRET(easysrc_add(&easysrc_code, c));
/* Each unconverted option */
if(easysrc_toohard) {
- for(ptr=easysrc_toohard->first; ptr; ptr = ptr->next)
+ for(ptr = easysrc_toohard->first; ptr; ptr = ptr->next)
CHKRET(easysrc_add(&easysrc_code, ptr->data));
}
CHKRET(easysrc_add(&easysrc_code, ""));
@@ -189,12 +189,12 @@ void dumpeasysrc(struct GlobalConfig *config)
int i;
const char *c;
- for(i=0; ((c = srchead[i]) != NULL); i++)
+ for(i = 0; ((c = srchead[i]) != NULL); i++)
fprintf(out, "%s\n", c);
/* Declare variables used for complex setopt values */
if(easysrc_decl) {
- for(ptr=easysrc_decl->first; ptr; ptr = ptr->next)
+ for(ptr = easysrc_decl->first; ptr; ptr = ptr->next)
fprintf(out, " %s\n", ptr->data);
}
@@ -202,13 +202,13 @@ void dumpeasysrc(struct GlobalConfig *config)
if(easysrc_data) {
fprintf(out, "\n");
- for(ptr=easysrc_data->first; ptr; ptr = ptr->next)
+ for(ptr = easysrc_data->first; ptr; ptr = ptr->next)
fprintf(out, " %s\n", ptr->data);
}
fprintf(out, "\n");
if(easysrc_code) {
- for(ptr=easysrc_code->first; ptr; ptr = ptr->next) {
+ for(ptr = easysrc_code->first; ptr; ptr = ptr->next) {
if(ptr->data[0]) {
fprintf(out, " %s\n", ptr->data);
}
@@ -219,11 +219,11 @@ void dumpeasysrc(struct GlobalConfig *config)
}
if(easysrc_clean) {
- for(ptr=easysrc_clean->first; ptr; ptr = ptr->next)
+ for(ptr = easysrc_clean->first; ptr; ptr = ptr->next)
fprintf(out, " %s\n", ptr->data);
}
- for(i=0; ((c = srcend[i]) != NULL); i++)
+ for(i = 0; ((c = srcend[i]) != NULL); i++)
fprintf(out, "%s\n", c);
if(fopened)
diff --git a/src/tool_formparse.c b/src/tool_formparse.c
index 95e0980d1..091885877 100644
--- a/src/tool_formparse.c
+++ b/src/tool_formparse.c
@@ -77,7 +77,7 @@ static char *get_param_word(char **str, char **end_pos)
while(ptr < *end_pos);
*end_pos = ptr2;
}
- while(*ptr && NULL==strchr(end_chars, *ptr))
+ while(*ptr && NULL == strchr(end_chars, *ptr))
++ptr;
*str = ptr;
return word_begin+1;
@@ -88,7 +88,7 @@ static char *get_param_word(char **str, char **end_pos)
ptr = word_begin;
}
- while(*ptr && NULL==strchr(end_chars, *ptr))
+ while(*ptr && NULL == strchr(end_chars, *ptr))
++ptr;
*str = *end_pos = ptr;
return word_begin;
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 31fc7a1ff..1a3facf11 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -492,7 +492,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
if(!longopt) {
letter = (char)*parse;
- subletter='\0';
+ subletter = '\0';
}
else {
letter = parse[0];
@@ -1190,7 +1190,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
config->resume_from_current = TRUE;
config->resume_from = 0;
}
- config->use_resume=TRUE;
+ config->use_resume = TRUE;
break;
case 'd':
/* postfield data */
@@ -1608,7 +1608,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
nextarg,
&config->mimepost,
&config->mimecurrent,
- (subletter=='s')?TRUE:FALSE)) /* 's' means literal string */
+ (subletter == 's')?TRUE:FALSE)) /* 's' is literal string */
return PARAM_BAD_USE;
if(SetHTTPrequest(config, HTTPREQ_MIMEPOST, &config->httpreq))
return PARAM_BAD_USE;
@@ -2053,7 +2053,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
break;
}
now = time(NULL);
- config->condtime=curl_getdate(nextarg, &now);
+ config->condtime = curl_getdate(nextarg, &now);
if(-1 == (int)config->condtime) {
/* now let's see if it is a file name to get the time from instead! */
struct_stat statbuf;
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 25ea9c4e6..ef15ed136 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -525,7 +525,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
urlnum = 1; /* without globbing, this is a single URL */
/* if multiple files extracted to stdout, insert separators! */
- separator= ((!outfiles || !strcmp(outfiles, "-")) && urlnum > 1);
+ separator = ((!outfiles || !strcmp(outfiles, "-")) && urlnum > 1);
/* Here's looping around each globbed URL */
for(li = 0 ; li < urlnum; li++) {
@@ -822,7 +822,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
if(strchr(pc, '?'))
/* Ouch, there's already a question mark in the URL string, we
then append the data with an ampersand separator instead! */
- sep='&';
+ sep = '&';
}
/*
* Then append ? followed by the get fields to the url.
diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
index 80d47573f..3a2949fa8 100644
--- a/src/tool_paramhlp.c
+++ b/src/tool_paramhlp.c
@@ -334,7 +334,7 @@ long proto2num(struct OperationConfig *config, long *val, const char *str)
}
}
- for(pp=protos; pp->name; pp++) {
+ for(pp = protos; pp->name; pp++) {
if(curl_strequal(token, pp->name)) {
switch(action) {
case deny:
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
index 93814f454..540bdb18a 100644
--- a/src/tool_parsecfg.c
+++ b/src/tool_parsecfg.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -131,7 +131,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
while(NULL != (aline = my_get_line(file))) {
lineno++;
line = aline;
- alloced_param=FALSE;
+ alloced_param = FALSE;
/* line with # in the first non-blank column is a comment! */
while(*line && ISSPACE(*line))
diff --git a/src/tool_setopt.c b/src/tool_setopt.c
index a8e205938..fd9bba4d6 100644
--- a/src/tool_setopt.c
+++ b/src/tool_setopt.c
@@ -229,24 +229,24 @@ static char *c_escape(const char *str, size_t len)
return NULL;
e = escaped;
- for(s=str; (c=*s) != '\0'; s++) {
- if(c=='\n') {
+ for(s = str; (c = *s) != '\0'; s++) {
+ if(c == '\n') {
strcpy(e, "\\n");
e += 2;
}
- else if(c=='\r') {
+ else if(c == '\r') {
strcpy(e, "\\r");
e += 2;
}
- else if(c=='\t') {
+ else if(c == '\t') {
strcpy(e, "\\t");
e += 2;
}
- else if(c=='\\') {
+ else if(c == '\\') {
strcpy(e, "\\\\");
e += 2;
}
- else if(c=='"') {
+ else if(c == '"') {
strcpy(e, "\\\"");
e += 2;
}
@@ -276,7 +276,7 @@ CURLcode tool_setopt_enum(CURL *curl, struct GlobalConfig *config,
if(config->libcurl && !skip && !ret) {
/* we only use this for real if --libcurl was used */
const NameValue *nv = NULL;
- for(nv=nvlist; nv->name; nv++) {
+ for(nv = nvlist; nv->name; nv++) {
if(nv->value == lval) break; /* found it */
}
if(! nv->name) {
@@ -313,7 +313,7 @@ CURLcode tool_setopt_flags(CURL *curl, struct GlobalConfig *config,
const NameValue *nv = NULL;
snprintf(preamble, sizeof(preamble),
"curl_easy_setopt(hnd, %s, ", name);
- for(nv=nvlist; nv->name; nv++) {
+ for(nv = nvlist; nv->name; nv++) {
if((nv->value & ~ rest) == 0) {
/* all value flags contained in rest */
rest &= ~ nv->value; /* remove bits handled here */
@@ -356,7 +356,7 @@ CURLcode tool_setopt_bitmask(CURL *curl, struct GlobalConfig *config,
const NameValueUnsigned *nv = NULL;
snprintf(preamble, sizeof(preamble),
"curl_easy_setopt(hnd, %s, ", name);
- for(nv=nvlist; nv->name; nv++) {
+ for(nv = nvlist; nv->name; nv++) {
if((nv->value & ~ rest) == 0) {
/* all value flags contained in rest */
rest &= ~ nv->value; /* remove bits handled here */
@@ -632,7 +632,7 @@ CURLcode tool_setopt(CURL *curl, bool str, struct GlobalConfig *config,
long lval = va_arg(arg, long);
long defval = 0L;
const NameValue *nv = NULL;
- for(nv=setopt_nv_CURLNONZERODEFAULTS; nv->name; nv++) {
+ for(nv = setopt_nv_CURLNONZERODEFAULTS; nv->name; nv++) {
if(!strcmp(name, nv->name)) {
defval = nv->value;
break; /* found it */
diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c
index d56dcd912..42cb086db 100644
--- a/src/tool_urlglob.c
+++ b/src/tool_urlglob.c
@@ -259,7 +259,7 @@ static CURLcode glob_range(URLGlob *glob, char **patternp,
errno = 0;
min_n = strtoul(pattern, &endp, 10);
if(errno || (endp == pattern))
- endp=NULL;
+ endp = NULL;
else {
if(*endp != '-')
endp = NULL;
@@ -287,7 +287,7 @@ static CURLcode glob_range(URLGlob *glob, char **patternp,
else
step_n = 1;
if(endp && (*endp == ']')) {
- pattern= endp+1;
+ pattern = endp+1;
}
else
endp = NULL;
@@ -444,7 +444,7 @@ CURLcode glob_url(URLGlob **glob, char *url, unsigned long *urlnum,
glob_buffer = malloc(strlen(url) + 1);
if(!glob_buffer)
return CURLE_OUT_OF_MEMORY;
- glob_buffer[0]=0;
+ glob_buffer[0] = 0;
glob_expand = calloc(1, sizeof(URLGlob));
if(!glob_expand) {
@@ -623,12 +623,12 @@ CURLcode glob_match_url(char **result, char *filename, URLGlob *glob)
unsigned long i;
char *ptr = filename;
unsigned long num = strtoul(&filename[1], &filename, 10);
- URLPattern *pat =NULL;
+ URLPattern *pat = NULL;
if(num < glob->size) {
num--; /* make it zero based */
/* find the correct glob entry */
- for(i=0; i<glob->size; i++) {
+ for(i = 0; i<glob->size; i++) {
if(glob->pattern[i].globindex == (int)num) {
pat = &glob->pattern[i];
break;