]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/windows/serial.cpp
Use nullptr instead of 0 for pointers
[libs/core.git] / source / io / windows / serial.cpp
index 84a3175f875c4b0b774f1b5e1c1004db1d6bd351..bd086dd4d88e0985d6ab292f0bebeed92f5453f2 100644 (file)
@@ -13,7 +13,7 @@ void Serial::platform_init(const string &port)
 {
        string name = "\\\\.\\"+port;
 
-       *handle = CreateFile(name.c_str(), GENERIC_READ|GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OVERLAPPED, 0);
+       *handle = CreateFile(name.c_str(), GENERIC_READ|GENERIC_WRITE, 0, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OVERLAPPED, nullptr);
        if(!handle)
                throw system_error(format("CreateFile(%s)", port));
        mode = M_READ|M_WRITE;