Skip to content

Commit

Permalink
sources/od_ldap.h: fix warns about deprecated values (#758)
Browse files Browse the repository at this point in the history
Signed-off-by: rkhapov <[email protected]>
Co-authored-by: rkhapov <[email protected]>
  • Loading branch information
rkhapov and rkhapov authored Jan 29, 2025
1 parent 6b2031e commit 188bccd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions sources/od_ldap.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef ODYSSEY_LDAP_H
#define ODYSSEY_LDAP_H

// For functions ldap_unbind, ldap_search_s, ldap_simple_bind_s
#define LDAP_DEPRECATED 1

#include <ldap.h>

typedef struct {
Expand Down
4 changes: 2 additions & 2 deletions sources/rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ void od_rules_rule_free(od_rule_t *rule)
free(rule->ldap_storage_credentials_attr);
if (rule->ldap_endpoint)
od_ldap_endpoint_free(rule->ldap_endpoint);
if (&rule->ldap_storage_creds_list) {
if (!od_list_empty(&rule->ldap_storage_creds_list)) {
od_list_foreach_safe(&rule->ldap_storage_creds_list, i, n)
{
od_ldap_storage_credentials_t *lsc;
Expand Down Expand Up @@ -1871,7 +1871,7 @@ void od_rules_print(od_rules_t *rules, od_logger_t *logger)
" ldap_storage_credentials_attr %s",
rule->ldap_storage_credentials_attr);
}
if (&rule->ldap_storage_creds_list) {
if (!od_list_empty(&rule->ldap_storage_creds_list)) {
od_list_t *f;
od_list_foreach(&rule->ldap_storage_creds_list, f)
{
Expand Down

0 comments on commit 188bccd

Please sign in to comment.