]> git.ipfire.org Git - thirdparty/curl.git/commit
ldap: tidy-up types, fix error code confusion
authorViktor Szakats <commit@vsz.me>
Mon, 6 Oct 2025 13:46:29 +0000 (15:46 +0200)
committerViktor Szakats <commit@vsz.me>
Mon, 6 Oct 2025 17:31:13 +0000 (19:31 +0200)
commitef1794e50e111dd4683b12875be7a685c63e44ca
tree40f03b2cf11650530371029cd4ac80703c0f9cc2
parent92a212568403d985a2614a7d206bf34b7a8fb827
ldap: tidy-up types, fix error code confusion

- fix `CURLcode` vs. LDAP result code confusion.
  Return `LDAP_NO_MEMORY` when `Curl_create_sspi_identity()` fails,
  since it can only return `CURLE_OUT_OF_MEMORY` as error.
- use `ULONG` for result code on Windows. Drop casts.
- use portable `curl_ldap_num_t`. Drop casts.
- replace magic number 0 with `LDAP_SUCCESS`.
- compare with `LDAP_SUCCESS` instead of assuming non-zero.
  (where necessary.)
- add/fix `#endif` comments.
- fix indentation.

Closes #18888
lib/ldap.c