From 6296f799204303d11b6fb32ca1580cd081b0143a Mon Sep 17 00:00:00 2001 From: Kosmas Raptis Date: Sun, 11 Apr 2021 09:52:48 +0300 Subject: [PATCH] samples: Change "reason" to "error code" in winapi samples --- samples/winapi_drivelist/main.c | 2 ++ samples/winapi_filefind/main.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/samples/winapi_drivelist/main.c b/samples/winapi_drivelist/main.c index 5f5907380..3fd49f3a6 100644 --- a/samples/winapi_drivelist/main.c +++ b/samples/winapi_drivelist/main.c @@ -78,4 +78,6 @@ int main(void) while (1) { Sleep(2000); } + + return 0; } diff --git a/samples/winapi_filefind/main.c b/samples/winapi_filefind/main.c index a9492e809..0594d9dd5 100644 --- a/samples/winapi_filefind/main.c +++ b/samples/winapi_filefind/main.c @@ -15,7 +15,7 @@ int main(void) if (!ret) { // There was an error. We can get more information about an error from WinAPI code using GetLastError() DWORD mountError = GetLastError(); - debugPrint("Failed to mount C: drive! Reason: %x\n", mountError); + debugPrint("Failed to mount C: drive! Error code: %x\n", mountError); goto sleepForever; } @@ -30,7 +30,7 @@ int main(void) DWORD findFileError; if (hFind == INVALID_HANDLE_VALUE) { findFileError = GetLastError(); - debugPrint("FindFirstHandle() failed! Reason: %x\n", findFileError); + debugPrint("FindFirstHandle() failed! Error code: %x\n", findFileError); goto cleanup; } @@ -59,10 +59,12 @@ int main(void) // If there was an error while unmounting if (!ret) { DWORD unmountError = GetLastError(); - debugPrint("Couldn't unmount C: drive! Reason: %x", unmountError); + debugPrint("Couldn't unmount C: drive! Error code: %x", unmountError); } sleepForever: while (1) { Sleep(2000); } + + return 0; }