aboutsummaryrefslogtreecommitdiff
path: root/src/modules/extra/m_pgsql.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-09-03 22:52:53 +0100
committerGravatar Sadie Powell2022-09-03 23:17:05 +0100
commit9203f40f41e4a735d379d13867d277c696fb28c5 (patch)
tree93a171344e801b44918229fdd6b8778293ab88aa /src/modules/extra/m_pgsql.cpp
parentFix some warnings noticed by the bugprone-* clang-tidy checkers. (diff)
Fix some warnings noticed by the readability-* clang-tidy checkers.
Diffstat (limited to 'src/modules/extra/m_pgsql.cpp')
-rw-r--r--src/modules/extra/m_pgsql.cpp8
1 files changed, 4 insertions, 4 deletions
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<char> 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<char> 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);
}
}
}