2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-04 07:55:18 +00:00

[#1071] always cast to target type

This commit is contained in:
Razvan Becheriu
2020-01-21 16:44:13 +02:00
committed by Tomek Mrugalski
parent c3f7706558
commit 9bcc1e819a
2 changed files with 2 additions and 9 deletions

View File

@@ -189,11 +189,7 @@ public:
std::vector<my_bools>& error) { std::vector<my_bools>& error) {
for (size_t i = 0; i < error.size(); ++i) { for (size_t i = 0; i < error.size(); ++i) {
error[i] = MLM_FALSE; error[i] = MLM_FALSE;
#ifdef HAVE_MYSQL_MY_BOOL bind[i].error = reinterpret_cast<my_bool*>(&error[i]);
bind[i].error = reinterpret_cast<char*>(&error[i]);
#else
bind[i].error = reinterpret_cast<bool*>(&error[i]);
#endif
} }
}; };

View File

@@ -355,11 +355,8 @@ public:
size_t count) { size_t count) {
for (size_t i = 0; i < count; ++i) { for (size_t i = 0; i < count; ++i) {
error[i] = MLM_FALSE; error[i] = MLM_FALSE;
#ifdef HAVE_MYSQL_MY_BOOL
bind[i].error = reinterpret_cast<char*>(&error[i]);
#else
bind[i].error = &error[i];
#endif #endif
bind[i].error = reinterpret_cast<my_bool*>(&error[i]);
} }
} }