aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2019-11-30 19:37:57 -0900
committerDavid M. Syzdek <david@syzdek.net>2019-11-30 19:37:57 -0900
commitab1c7b6fb546384662e3a8708e45328b33459299 (patch)
tree7393b1263c6c677bb87c3057041bb399c806a089
parent1983c13fe685ee863b02b862aca516cfbd7b6a48 (diff)
downloadldap-utils-ab1c7b6fb546384662e3a8708e45328b33459299.tar.gz
ldap-utils-ab1c7b6fb546384662e3a8708e45328b33459299.tar.bz2
ldap-utils-ab1c7b6fb546384662e3a8708e45328b33459299.tar.xz
ldap-utils-ab1c7b6fb546384662e3a8708e45328b33459299.zip
libldaputils: resolving warnings in lentry.c
-rw-r--r--lib/libldaputils/lentry.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/lib/libldaputils/lentry.c b/lib/libldaputils/lentry.c
index 4de8be3..13f7d90 100644
--- a/lib/libldaputils/lentry.c
+++ b/lib/libldaputils/lentry.c
@@ -209,6 +209,10 @@ LDAPUtilsAttribute * ldaputils_attribute_initialize(const char * name, struct be
209/// compares two LDAP values for sorting 209/// compares two LDAP values for sorting
210/// @param[in] ptr1 pointer to first data item to compare 210/// @param[in] ptr1 pointer to first data item to compare
211/// @param[in] ptr2 pointer to second data item to compare 211/// @param[in] ptr2 pointer to second data item to compare
212///
213/// @return Return an integer greater than, equal to, or less than 0,
214/// according as the string ptr1 is greater than, equal to, or less
215/// than the string ptr2.
212int ldaputils_berval_cmp(const struct berval ** ptr1, const struct berval ** ptr2) 216int ldaputils_berval_cmp(const struct berval ** ptr1, const struct berval ** ptr2)
213{ 217{
214 int rc; 218 int rc;
@@ -316,6 +320,9 @@ LDAPUtilsEntries * ldaputils_entries_initialize(void)
316 320
317/// sorts values 321/// sorts values
318/// @param[in] entries list of attribute values to sort 322/// @param[in] entries list of attribute values to sort
323/// @param[in] compar compare function to use for sorting entries
324///
325/// @return Return 0 on success or -1 on error,
319int ldaputils_entries_sort(LDAPUtilsEntries * entries, int (*compar)(const void *, const void *)) 326int ldaputils_entries_sort(LDAPUtilsEntries * entries, int (*compar)(const void *, const void *))
320{ 327{
321 assert(entries != NULL); 328 assert(entries != NULL);
@@ -377,6 +384,10 @@ int ldaputils_entry_add_attribute(LDAPUtilsEntry * entry, const char * name, str
377/// compares two LDAP values for sorting 384/// compares two LDAP values for sorting
378/// @param[in] ptr1 pointer to first data item to compare 385/// @param[in] ptr1 pointer to first data item to compare
379/// @param[in] ptr2 pointer to second data item to compare 386/// @param[in] ptr2 pointer to second data item to compare
387///
388/// @return Return an integer greater than, equal to, or less than 0,
389/// according as the string ptr1 is greater than, equal to, or less
390/// than the string ptr2.
380int ldaputils_entry_cmp(const void * ptr1, const void * ptr2) 391int ldaputils_entry_cmp(const void * ptr1, const void * ptr2)
381{ 392{
382 int rc; 393 int rc;
@@ -419,6 +430,10 @@ int ldaputils_entry_cmp(const void * ptr1, const void * ptr2)
419/// compares two LDAP values for sorting 430/// compares two LDAP values for sorting
420/// @param[in] ptr1 pointer to first data item to compare 431/// @param[in] ptr1 pointer to first data item to compare
421/// @param[in] ptr2 pointer to second data item to compare 432/// @param[in] ptr2 pointer to second data item to compare
433///
434/// @return Return an integer greater than, equal to, or less than 0,
435/// according as the DN ptr1 is greater than, equal to, or less
436/// than the DN ptr2.
422int ldaputils_entry_cmp_dn(const void * ptr1, const void * ptr2) 437int ldaputils_entry_cmp_dn(const void * ptr1, const void * ptr2)
423{ 438{
424 int rc; 439 int rc;
@@ -610,8 +625,11 @@ LDAPUtilsEntry * ldaputils_next_entry(LDAPUtilsEntries * entries)
610 625
611 626
612/// retrieves LDAP entries from result 627/// retrieves LDAP entries from result
613/// @param[in] ld refernce to LDAP socket data 628/// @param[in] ld refernce to LDAP socket data
614/// @param[in] res refernce to LDAP result message 629/// @param[in] res refernce to LDAP result message
630/// @param[in] sortattr attribute to use for sorting entries
631///
632/// @return Returns sorted array of LDAPUtilsEntries
615LDAPUtilsEntries * ldaputils_get_entries(LDAP * ld, LDAPMessage * res, 633LDAPUtilsEntries * ldaputils_get_entries(LDAP * ld, LDAPMessage * res,
616 const char * sortattr) 634 const char * sortattr)
617{ 635{
@@ -751,6 +769,8 @@ struct berval ** ldaputils_values_len_copy(struct berval ** vals)
751 769
752/// sorts values 770/// sorts values
753/// @param[in] vals list of attribute values to sort 771/// @param[in] vals list of attribute values to sort
772///
773/// @return Returns 0 on success or 1 on error.
754int ldaputils_values_sort(struct berval ** vals) 774int ldaputils_values_sort(struct berval ** vals)
755{ 775{
756 size_t len; 776 size_t len;