From 9203f40f41e4a735d379d13867d277c696fb28c5 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 3 Sep 2022 22:52:53 +0100 Subject: Fix some warnings noticed by the readability-* clang-tidy checkers. --- src/modules/extra/m_pgsql.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules/extra/m_pgsql.cpp') diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index ad3743ad9..e388f377f 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -446,10 +446,10 @@ restart: std::string parm = p[param++]; std::vector buffer(parm.length() * 2 + 1); int error; - size_t escapedsize = PQescapeStringConn(sql, &buffer[0], parm.data(), parm.length(), &error); + size_t escapedsize = PQescapeStringConn(sql, buffer.data(), parm.data(), parm.length(), &error); if (error) ServerInstance->Logs.Debug(MODNAME, "BUG: Apparently PQescapeStringConn() failed"); - res.append(&buffer[0], escapedsize); + res.append(buffer.data(), escapedsize); } } } @@ -477,10 +477,10 @@ restart: std::string parm = it->second; std::vector buffer(parm.length() * 2 + 1); int error; - size_t escapedsize = PQescapeStringConn(sql, &buffer[0], parm.data(), parm.length(), &error); + size_t escapedsize = PQescapeStringConn(sql, buffer.data(), parm.data(), parm.length(), &error); if (error) ServerInstance->Logs.Debug(MODNAME, "BUG: Apparently PQescapeStringConn() failed"); - res.append(&buffer[0], escapedsize); + res.append(buffer.data(), escapedsize); } } } -- cgit v1.3.1-10-gc9f91