Commit 6f293950 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

reduce scope for variable (found by cpp-check)

parent 6e558068
Pipeline #106056 passed with stage
in 1 minute and 34 seconds
......@@ -691,11 +691,6 @@ void LDAPProtocol::put(const QUrl &_url, int, KIO::JobFlags flags)
*/
void LDAPProtocol::listDir(const QUrl &_url)
{
int ret;
int ret2;
int id;
int id2;
unsigned long total = 0;
QStringList att;
QStringList saveatt;
LdapUrl usrc(_url);
......@@ -720,6 +715,7 @@ void LDAPProtocol::listDir(const QUrl &_url)
if (_url.query().isEmpty()) {
usrc.setScope(LdapUrl::One);
}
int id;
if ((id = mOp.search(usrc.dn(), usrc.scope(), usrc.filter(), usrc.attributes())) == -1) {
LDAPErr();
......@@ -731,6 +727,11 @@ void LDAPProtocol::listDir(const QUrl &_url)
// publish the results
UDSEntry uds;
int ret;
int ret2;
int id2;
unsigned long total = 0;
while (true) {
ret = mOp.waitForResult(id, -1);
if (ret == -1 || mConn.ldapErrorCode() != KLDAP_SUCCESS) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment