Skip to content

Commit 7187b4d

Browse files
[ROSTESTS] sertest.c: Replace a busy loop with 'Sleep()' (reactos#2886)
Detected by Cppcheck: uninitvar. ROSTESTS-204 Co-authored-by: Victor Martinez <[email protected]>
1 parent fbb612f commit 7187b4d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

modules/rostests/tests/sertest/sertest.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ int main(int argc, char *argv[])
1818
BOOL bResult;
1919
HANDLE hPort;
2020
int i;
21-
int j;
22-
int k;
2321
int nPortNum = 1;
2422

2523
TCHAR szPortName[MAX_PORTNAME_LEN];
@@ -56,9 +54,7 @@ int main(int argc, char *argv[])
5654
if (!bResult) {
5755
printf("WARNING: EscapeCommFunction(SETRTS) failed: %lx\n", (DWORD)bResult);
5856
}
59-
for (j = 0; j < 1000; j++) {
60-
k *= j;
61-
}
57+
Sleep(500);
6258
/*
6359
#define CLRDTR (6)
6460
#define CLRRTS (4)

0 commit comments

Comments
 (0)