https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7187b4d846f690996543fd...
commit 7187b4d846f690996543fd605345c48962fe22e6 Author: Serge Gautherie 32623169+SergeGautherie@users.noreply.github.com AuthorDate: Sat Jul 4 15:18:22 2020 +0200 Commit: GitHub noreply@github.com CommitDate: Sat Jul 4 15:18:22 2020 +0200
[ROSTESTS] sertest.c: Replace a busy loop with 'Sleep()' (#2886)
Detected by Cppcheck: uninitvar. ROSTESTS-204
Co-authored-by: Victor Martinez vicmarcal@gmail.com --- modules/rostests/tests/sertest/sertest.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/modules/rostests/tests/sertest/sertest.c b/modules/rostests/tests/sertest/sertest.c index ea5cdbe379a..f56f36ec83f 100644 --- a/modules/rostests/tests/sertest/sertest.c +++ b/modules/rostests/tests/sertest/sertest.c @@ -18,8 +18,6 @@ int main(int argc, char *argv[]) BOOL bResult; HANDLE hPort; int i; - int j; - int k; int nPortNum = 1;
TCHAR szPortName[MAX_PORTNAME_LEN]; @@ -56,9 +54,7 @@ int main(int argc, char *argv[]) if (!bResult) { printf("WARNING: EscapeCommFunction(SETRTS) failed: %lx\n", (DWORD)bResult); } - for (j = 0; j < 1000; j++) { - k *= j; - } + Sleep(500); /* #define CLRDTR (6) #define CLRRTS (4)