[ROSTESTS] sertest.c: Replace a busy loop with 'Sleep()' (#2886)

Detected by Cppcheck: uninitvar.
ROSTESTS-204

Co-authored-by: Victor Martinez <vicmarcal@gmail.com>
This commit is contained in:
Serge Gautherie 2020-07-04 15:18:22 +02:00 committed by GitHub
parent fbb612f41a
commit 7187b4d846
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)