]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5107] Avoid static cast from NULL to uint32_t.
authorMarcin Siodelski <marcin@isc.org>
Tue, 28 Feb 2017 16:25:20 +0000 (17:25 +0100)
committerMarcin Siodelski <marcin@isc.org>
Tue, 28 Feb 2017 16:25:20 +0000 (17:25 +0100)
src/lib/dhcpsrv/mysql_host_data_source.cc

index c5b754854664d3c24881464846b68f4f2c37c394..9c3540239d51911dd47fcdb14b3a54f1659924ef 100644 (file)
@@ -253,7 +253,7 @@ public:
             // host_id : INT UNSIGNED NOT NULL
             // The host_id is auto_incremented by MySQL database,
             // so we need to pass the NULL value
-            host_id_ = static_cast<uint32_t>(NULL);
+            host_id_ = 0;
             bind_[0].buffer_type = MYSQL_TYPE_LONG;
             bind_[0].buffer = reinterpret_cast<char*>(&host_id_);
             bind_[0].is_unsigned = MLM_TRUE;