diff options
| author | David M. Syzdek <david@syzdek.net> | 2019-11-30 19:37:57 -0900 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2019-11-30 19:37:57 -0900 |
| commit | ab1c7b6fb546384662e3a8708e45328b33459299 (patch) | |
| tree | 7393b1263c6c677bb87c3057041bb399c806a089 /lib/libldaputils | |
| parent | 1983c13fe685ee863b02b862aca516cfbd7b6a48 (diff) | |
| download | ldap-utils-ab1c7b6fb546384662e3a8708e45328b33459299.tar.gz ldap-utils-ab1c7b6fb546384662e3a8708e45328b33459299.tar.bz2 ldap-utils-ab1c7b6fb546384662e3a8708e45328b33459299.tar.xz ldap-utils-ab1c7b6fb546384662e3a8708e45328b33459299.zip | |
libldaputils: resolving warnings in lentry.c
Diffstat (limited to 'lib/libldaputils')
| -rw-r--r-- | lib/libldaputils/lentry.c | 24 |
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. | ||
| 212 | int ldaputils_berval_cmp(const struct berval ** ptr1, const struct berval ** ptr2) | 216 | int 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, | ||
| 319 | int ldaputils_entries_sort(LDAPUtilsEntries * entries, int (*compar)(const void *, const void *)) | 326 | int 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. | ||
| 380 | int ldaputils_entry_cmp(const void * ptr1, const void * ptr2) | 391 | int 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. | ||
| 422 | int ldaputils_entry_cmp_dn(const void * ptr1, const void * ptr2) | 437 | int 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 | ||
| 615 | LDAPUtilsEntries * ldaputils_get_entries(LDAP * ld, LDAPMessage * res, | 633 | LDAPUtilsEntries * 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. | ||
| 754 | int ldaputils_values_sort(struct berval ** vals) | 774 | int ldaputils_values_sort(struct berval ** vals) |
| 755 | { | 775 | { |
| 756 | size_t len; | 776 | size_t len; |
