From 5eccabcad15a52691228aded1d9c1fd5074fb70e Mon Sep 17 00:00:00 2001 From: David Skoland Date: Fri, 12 Jul 2019 23:00:25 +0000 Subject: Less insane debugging; minor refactoring (!75) --- src/hardware_functions.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/hardware_functions.cpp') diff --git a/src/hardware_functions.cpp b/src/hardware_functions.cpp index ebba6ab7..5d6b6ffa 100644 --- a/src/hardware_functions.cpp +++ b/src/hardware_functions.cpp @@ -5,12 +5,12 @@ #if (defined (_WIN32) || defined (_WIN64)) #include -DWORD dwVolSerial; -BOOL bIsRetrieved; +static DWORD dwVolSerial; +static BOOL bIsRetrieved; QString get_hdid() { - bIsRetrieved = GetVolumeInformation(TEXT("C:\\"), NULL, NULL, &dwVolSerial, NULL, NULL, NULL, NULL); + bIsRetrieved = GetVolumeInformation(TEXT("C:\\"), nullptr, 0, &dwVolSerial, nullptr, nullptr, nullptr, 0); if (bIsRetrieved) return QString::number(dwVolSerial, 16); @@ -18,7 +18,6 @@ QString get_hdid() //a totally random string //what could possibly go wrong return "gxsps32sa9fnwic92mfbs0"; - } #elif (defined (LINUX) || defined (__linux__)) -- cgit