Skip to content

Commit

Permalink
lib version
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Apr 30, 2024
1 parent fbb7e11 commit 3c39ee1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,11 @@ char *curl_version(void)
api.ldapai_info_version = LDAP_API_INFO_VERSION;

if(ldap_get_option(NULL, LDAP_OPT_API_INFO, &api) == LDAP_OPT_SUCCESS) {
unsigned int patch = api.ldapai_vendor_version % 100;
unsigned int major = api.ldapai_vendor_version / 10000;
unsigned int patch = (unsigned int)(api.ldapai_vendor_version % 100);
unsigned int major = (unsigned int)(api.ldapai_vendor_version / 10000);
unsigned int minor =
((api.ldapai_vendor_version - major * 10000) - patch) / 100;
(((unsigned int)api.ldapai_vendor_version - major * 10000)
- patch) / 100;
msnprintf(ldap_buf, sizeof(ldap_buf), "%s/%u.%u.%u",
api.ldapai_vendor_name, major, minor, patch);
src[i++] = ldap_buf;
Expand Down Expand Up @@ -641,7 +642,7 @@ curl_version_info_data *curl_version_info(CURLversion stamp)
#ifdef USE_NGHTTP2
{
nghttp2_info *h2 = nghttp2_version(0);
version_info.nghttp2_ver_num = h2->version_num;
version_info.nghttp2_ver_num = (unsigned int)h2->version_num;
version_info.nghttp2_version = h2->version_str;
}
#endif
Expand Down

0 comments on commit 3c39ee1

Please sign in to comment.