- int cert_option = LDAP_OPT_X_TLS_NEVER;
- if (Ustrcmp(eldap_require_cert, "hard") == 0)
- {
- cert_option = LDAP_OPT_X_TLS_HARD;
- }
- else if (Ustrcmp(eldap_require_cert, "demand") == 0)
- {
- cert_option = LDAP_OPT_X_TLS_DEMAND;
- }
- else if (Ustrcmp(eldap_require_cert, "allow") == 0)
- {
- cert_option = LDAP_OPT_X_TLS_ALLOW;
- }
- else if (Ustrcmp(eldap_require_cert, "try") == 0)
- {
- cert_option = LDAP_OPT_X_TLS_TRY;
- }
+ int cert_option =
+ Ustrcmp(eldap_require_cert, "hard") == 0 ? LDAP_OPT_X_TLS_HARD
+ : Ustrcmp(eldap_require_cert, "demand") == 0 ? LDAP_OPT_X_TLS_DEMAND
+ : Ustrcmp(eldap_require_cert, "allow") == 0 ? LDAP_OPT_X_TLS_ALLOW
+ : Ustrcmp(eldap_require_cert, "try") == 0 ? LDAP_OPT_X_TLS_TRY
+ : LDAP_OPT_X_TLS_NEVER;
+