Skip to content

Commit

Permalink
ccsidcurl: fix the compile errors
Browse files Browse the repository at this point in the history
Looks like the declaration of cpp shoule be const char ** and return
null if convert_version_info_string fails.

Fixes #7134
Closes #7135
  • Loading branch information
jonrumsey authored and bagder committed May 26, 2021
1 parent 3976dd6 commit 9655474
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/OS400/ccsidcurl.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid)
int nproto;
curl_version_info_data *id;
int i;
const char *cpp;
const char **cpp;
static const size_t charfields[] = {
offsetof(curl_version_info_data, version),
offsetof(curl_version_info_data, host),
Expand Down Expand Up @@ -485,8 +485,8 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid)

for(i = 0; i < sizeof(charfields) / sizeof(charfields[0]); i++) {
cpp = (const char **) ((char *) p + charfields[i]);
if(*cpp)
if(convert_version_info_string(cpp, &cp, &n, ccsid))
if (*cpp && convert_version_info_string(cpp, &cp, &n, ccsid))
return (curl_version_info_data *) NULL;
}

return id;
Expand Down

0 comments on commit 9655474

Please sign in to comment.