diff options
author | jonrumsey <jrumsey@uk.ibm.com> | 2021-05-26 17:03:32 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-05-26 23:36:22 +0200 |
commit | 9655474548b3cefdb2b1d4504c82b44cc01a1861 (patch) | |
tree | 384a95395702e708be2d0ff580ac7f97ff79731c | |
parent | 3976dd67a220309fe505202318c9c99bc952c7d5 (diff) | |
download | curl-9655474548b3cefdb2b1d4504c82b44cc01a1861.tar.gz |
ccsidcurl: fix the compile errors
Looks like the declaration of cpp shoule be const char ** and return
null if convert_version_info_string fails.
Fixes #7134
Closes #7135
-rw-r--r-- | packages/OS400/ccsidcurl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/OS400/ccsidcurl.c b/packages/OS400/ccsidcurl.c index e006cd1bb..4b30683ea 100644 --- a/packages/OS400/ccsidcurl.c +++ b/packages/OS400/ccsidcurl.c @@ -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), @@ -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; |