diff options
Diffstat (limited to 'packages/OS400/ccsidcurl.c')
-rw-r--r-- | packages/OS400/ccsidcurl.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/packages/OS400/ccsidcurl.c b/packages/OS400/ccsidcurl.c index 9049d9e49..e312c71ae 100644 --- a/packages/OS400/ccsidcurl.c +++ b/packages/OS400/ccsidcurl.c @@ -77,7 +77,8 @@ makeOS400IconvCode(char buf[ICONV_ID_SIZE], unsigned int ccsid) static iconv_t -iconv_open_CCSID(unsigned int ccsidout, unsigned int ccsidin, unsigned int cstr) +iconv_open_CCSID(unsigned int ccsidout, unsigned int ccsidin, + unsigned int cstr) { char fromcode[ICONV_ID_SIZE]; @@ -218,7 +219,7 @@ slist_convert(int dccsid, struct curl_slist * from, int sccsid) struct curl_slist * to = (struct curl_slist *) NULL; char * cp; - for (; from; from = from->next) { + for(; from; from = from->next) { if(!(cp = dynconvert(dccsid, from->data, -1, sccsid))) { curl_slist_free_all(to); return (struct curl_slist *) NULL; @@ -407,7 +408,7 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid) compiler seems to compare string values after substitution. */ #if CURLVERSION_NOW != CURLVERSION_FOURTH -#error curl_version_info_data structure has changed: upgrade this procedure too. +#error curl_version_info_data structure has changed: upgrade this procedure. #endif /* If caller has been compiled with a new version, error. */ @@ -426,7 +427,7 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid) nproto = 0; if(p->protocols) { - while (p->protocols[nproto]) + while(p->protocols[nproto]) n += strlen(p->protocols[nproto++]); n += nproto++; @@ -478,7 +479,7 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid) cp += i; n -= i; - for (i = 0; id->protocols[i]; i++) + for(i = 0; id->protocols[i]; i++) if(convert_version_info_string(((const char * *) id->protocols) + i, &cp, &n, ccsid)) return (curl_version_info_data *) NULL; @@ -593,7 +594,7 @@ curl_certinfo_free_all(struct curl_certinfo *info) /* Free all memory used by certificate info. */ if(info) { if(info->certinfo) { - for (i = 0; i < info->num_of_certs; i++) + for(i = 0; i < info->num_of_certs; i++) curl_slist_free_all(info->certinfo[i]); free((char *) info->certinfo); } @@ -653,13 +654,14 @@ curl_easy_getinfo_ccsid(CURL * curl, CURLINFO info, ...) if(!(cipt = (struct curl_certinfo *) malloc(sizeof *cipt))) ret = CURLE_OUT_OF_MEMORY; else { - cipt->certinfo = (struct curl_slist * *) calloc(cipf->num_of_certs + - 1, sizeof(struct curl_slist *)); + cipt->certinfo = (struct curl_slist * *) + calloc(cipf->num_of_certs + + 1, sizeof(struct curl_slist *)); if(!cipt->certinfo) ret = CURLE_OUT_OF_MEMORY; else { cipt->num_of_certs = cipf->num_of_certs; - for (i = 0; i < cipf->num_of_certs; i++) + for(i = 0; i < cipf->num_of_certs; i++) if(cipf->certinfo[i]) if(!(cipt->certinfo[i] = slist_convert(ccsid, cipf->certinfo[i], @@ -715,7 +717,7 @@ static void Curl_formadd_release_local(struct curl_forms * forms, int nargs, int skip) { - while (nargs--) + while(nargs--) if(nargs != skip) if(Curl_is_formadd_string(forms[nargs].option)) if(forms[nargs].value) @@ -755,7 +757,7 @@ Curl_formadd_convert(struct curl_forms * forms, return -1; } - cp2 = realloc(cp, l); /* Shorten buffer to the string size. */ + cp2 = realloc(cp, l); /* Shorten buffer to the string size. */ if(cp2) cp = cp2; @@ -763,7 +765,7 @@ Curl_formadd_convert(struct curl_forms * forms, forms[formx].value = cp; if(lengthx >= 0) - forms[lengthx].value = (char *) l; /* Update to length after conversion. */ + forms[lengthx].value = (char *) l; /* Update length after conversion. */ return l; } @@ -826,7 +828,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost, forms = (struct curl_forms *) NULL; va_start(arg, last_post); - for (;;) { + for(;;) { /* Make sure there is still room for an item in local array. */ if(nargs >= lformlen) { |