]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1071] always cast to target type
authorRazvan Becheriu <razvan@isc.org>
Tue, 21 Jan 2020 14:44:13 +0000 (16:44 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Fri, 21 Feb 2020 08:15:14 +0000 (09:15 +0100)
src/lib/dhcpsrv/mysql_host_data_source.cc
src/lib/dhcpsrv/mysql_lease_mgr.cc

index 505496e7fe201f9447dc139ec45e1677b00f9279..73c41342131485902340f515521c54402633a4da 100644 (file)
@@ -189,11 +189,7 @@ public:
                                    std::vector<my_bools>& error) {
         for (size_t i = 0; i < error.size(); ++i) {
             error[i] = MLM_FALSE;
-#ifdef HAVE_MYSQL_MY_BOOL
-            bind[i].error = reinterpret_cast<char*>(&error[i]);
-#else
-            bind[i].error = reinterpret_cast<bool*>(&error[i]);
-#endif
+            bind[i].error = reinterpret_cast<my_bool*>(&error[i]);
         }
     };
 
index bb547daad9163be4b5480a6a7397d590c7e88995..eba62afd9f84760ed434dd5b8159db8f9e7ec337 100644 (file)
@@ -355,11 +355,8 @@ public:
                                    size_t count) {
         for (size_t i = 0; i < count; ++i) {
             error[i] = MLM_FALSE;
-#ifdef HAVE_MYSQL_MY_BOOL
-            bind[i].error = reinterpret_cast<char*>(&error[i]);
-#else
-            bind[i].error = &error[i];
 #endif
+            bind[i].error = reinterpret_cast<my_bool*>(&error[i]);
         }
     }