diff --git a/src/coreencryption.cpp b/src/coreencryption.cpp index f6deef235..bd19eab76 100644 --- a/src/coreencryption.cpp +++ b/src/coreencryption.cpp @@ -154,8 +154,7 @@ QByteArray Core::getSaltFromFile(QString filename) file.close(); uint8_t *salt = new uint8_t[TOX_PASS_SALT_LENGTH]; - int err = tox_get_salt(reinterpret_cast(data.data()), salt); - if (err) + if (!tox_get_salt(reinterpret_cast(data.data()), salt)) { qWarning() << "Core: can't get salt from" << filename << "header"; return QByteArray();