chore: clean up use of string.h includes.

master
Johan Ouwerkerk 2020-11-22 16:12:08 +01:00
parent f25ae7ffda
commit 369593f33d
3 changed files with 6 additions and 6 deletions

View File

@ -8,7 +8,7 @@
#include <QScopedPointer>
#include <QtDebug>
#include <string.h>
#include <cstring>
namespace test
{
@ -61,7 +61,7 @@ namespace test
return std::nullopt;
}
memcpy(memory->data(), tokenSecret.constData(), memory->size());
std::memcpy(memory->data(), tokenSecret.constData(), memory->size());
std::optional<secrets::EncryptedSecret> s = secret->encrypt(memory.data());
if (!s) {
qDebug () << "Failed to encrypt token secret";

View File

@ -4,13 +4,13 @@
*/
#include "random.h"
#include <string.h>
#include <cstring>
namespace test
{
bool fakeRandom(void *buf, size_t size)
{
memset(buf, 'A', size);
std::memset(buf, 'A', size);
return true;
}
}

View File

@ -6,7 +6,7 @@
#include "../logging_p.h"
#include <string.h>
#include <cstring>
KEYSMITH_LOGGER(logger, ".accounts.keys")
@ -114,7 +114,7 @@ namespace accounts
if (m_password) {
qCDebug(logger) << "Accepted password for account secrets";
memcpy(m_password->data(), passwordBytes.constData(), m_password->size());
std::memcpy(m_password->data(), passwordBytes.constData(), m_password->size());
} else {
qCDebug(logger) << "Failed to accept password for account secrets";
}