diff options
author | Rich Megginson <rmeggins@redhat.com> | 2009-07-07 13:22:45 -0600 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2009-07-07 13:44:50 -0600 |
commit | 386ba57d421ee2d59a267d52d63bd88cbf20c435 (patch) | |
tree | 88db2ad09ae1f202a23ce45e6a430506be534ccd /ldap/servers/plugins/acl | |
parent | 209521323f731daad54682fd98715f7b22c88c78 (diff) | |
download | ds-386ba57d421ee2d59a267d52d63bd88cbf20c435.tar.gz ds-386ba57d421ee2d59a267d52d63bd88cbf20c435.tar.xz ds-386ba57d421ee2d59a267d52d63bd88cbf20c435.zip |
Clean up compiler warningssmallcleanupbasecleanup
This cleans up all of the compiler warnings produced with -Wall on RHEL/Fedora platforms.
The warnings about the %lld and %llu formats are still produced and cannot be helped.
Reviewed by: nkinder (Thanks!)
Diffstat (limited to 'ldap/servers/plugins/acl')
-rw-r--r-- | ldap/servers/plugins/acl/acl.c | 6 | ||||
-rw-r--r-- | ldap/servers/plugins/acl/acllas.c | 11 |
2 files changed, 12 insertions, 5 deletions
diff --git a/ldap/servers/plugins/acl/acl.c b/ldap/servers/plugins/acl/acl.c index b708cada..d62796fc 100644 --- a/ldap/servers/plugins/acl/acl.c +++ b/ldap/servers/plugins/acl/acl.c @@ -3148,6 +3148,7 @@ acl_match_substring ( Slapi_Filter *f, char *str, int exact_match) char *type, *initial, *final; char **any; Slapi_Regex *re = NULL; + const char *re_result = NULL; if ( 0 != slapi_filter_get_subfilt ( f, &type, &initial, &any, &final ) ) { return (ACL_FALSE); @@ -3235,11 +3236,10 @@ acl_match_substring ( Slapi_Filter *f, char *str, int exact_match) ** Now we will compile the pattern and compare wth the string to ** see if the input string matches with the patteren or not. */ - p = NULL; - re = slapi_re_comp( pat, &p ); + re = slapi_re_comp( pat, &re_result ); if (NULL == re) { slapi_log_error (SLAPI_LOG_ACL, plugin_name, - "acl_match_substring:re_comp failed (%s)\n", p?p:"unknown"); + "acl_match_substring:re_comp failed (%s)\n", re_result?re_result:"unknown"); return (ACL_ERR); } diff --git a/ldap/servers/plugins/acl/acllas.c b/ldap/servers/plugins/acl/acllas.c index abde4fd7..e16fbd27 100644 --- a/ldap/servers/plugins/acl/acllas.c +++ b/ldap/servers/plugins/acl/acllas.c @@ -2218,7 +2218,7 @@ acllas__handle_group_entry (Slapi_Entry* e, void *callback_data) Slapi_Attr *currAttr, *nextAttr; char *n_dn, *attrType; int n; - int i, j; + int i; info = (struct eval_info *) callback_data; info->result = ACL_FALSE; @@ -2252,11 +2252,18 @@ acllas__handle_group_entry (Slapi_Entry* e, void *callback_data) return 0; } if (!(n % ACLLAS_MAX_GRP_MEMBER)) { - struct member_info *orig_memberInfo = info->memberInfo[0]; + struct member_info **orig_memberInfo = info->memberInfo; info->memberInfo = (struct member_info **)slapi_ch_realloc( (char *)info->memberInfo, (n + ACLLAS_MAX_GRP_MEMBER) * sizeof(struct member_info *)); + if (!info->memberInfo) { + slapi_log_error( SLAPI_LOG_FATAL, plugin_name, + "acllas__handle_group_entry: out of memory - could not allocate space for %d group members\n", + n + ACLLAS_MAX_GRP_MEMBER ); + info->memberInfo = orig_memberInfo; + return 0; + } } /* allocate the space for the member and attch it to the list */ |