diff --git a/c/common/i2cdriver.c b/c/common/i2cdriver.c index f110303..181587a 100644 --- a/c/common/i2cdriver.c +++ b/c/common/i2cdriver.c @@ -5,8 +5,8 @@ #include #if !defined(WIN32) #include -#endif #include +#endif #include #define __STDC_FORMAT_MACROS #include @@ -55,7 +55,7 @@ HANDLE openSerialPort(const char *portname) if (portname[0] == 'C') fmt = "\\\\.\\%s"; else - fmt == "%s"; + fmt = "%s"; snprintf(fullname, sizeof(fullname), fmt, portname); DWORD accessdirection = GENERIC_READ | GENERIC_WRITE; HANDLE hSerial = CreateFile((LPCSTR)fullname,