From 9655474548b3cefdb2b1d4504c82b44cc01a1861 Mon Sep 17 00:00:00 2001 From: jonrumsey Date: Wed, 26 May 2021 17:03:32 +0100 Subject: 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 --- packages/OS400/ccsidcurl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages') 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; -- cgit v1.2.1