diff options
author | Simo Sorce <ssorce@redhat.com> | 2011-06-14 16:04:26 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2011-08-26 08:24:48 -0400 |
commit | e261c556268609b24bc923fd33b8b060dfaf1c19 (patch) | |
tree | e52bde5c0c649cbbf40e9dec1cc47e8983937425 /daemons/ipa-slapi-plugins/ipa-pwd-extop | |
parent | 1b4eab0411cd4e669e3bd18541f5736c9aa81467 (diff) | |
download | freeipa-e261c556268609b24bc923fd33b8b060dfaf1c19.tar.gz freeipa-e261c556268609b24bc923fd33b8b060dfaf1c19.tar.xz freeipa-e261c556268609b24bc923fd33b8b060dfaf1c19.zip |
Fix build warnings
Some are actual bugs.
Diffstat (limited to 'daemons/ipa-slapi-plugins/ipa-pwd-extop')
-rw-r--r-- | daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c index fc9ccb05c..dc295fc7e 100644 --- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c +++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c @@ -1082,7 +1082,7 @@ int ipapwd_get_cur_kvno(Slapi_Entry *target) LOG_TRACE("Error retrieving berval from Slapi_Value\n"); goto next; } - be = ber_init(cbval); + be = ber_init(discard_const(cbval)); if (!be) { LOG_TRACE("ber_init() failed!\n"); goto next; @@ -1292,7 +1292,7 @@ Slapi_Value **ipapwd_setPasswordHistory(Slapi_Mods *smods, count = 0; err = slapi_attr_get_numvalues(passwordHistory, &count); /* if we have one */ - if (count > 0 && data->pwHistoryLen > 0) { + if (err == 0 && count > 0 && data->pwHistoryLen > 0) { pH = calloc(count + 2, sizeof(Slapi_Value *)); if (!pH) { LOG_OOM(); |