Skip to content

Commit

Permalink
Code style fixes for win32_socket.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightwalker-87 committed Jun 13, 2020
1 parent c1918c0 commit 06aec5b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/win32/win32_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ char * win32_strtok_r(char *s, const char *delim, char **lasts) {
c = *s++;
spanp = (char *)delim;

do
do {
if ((sc = *spanp++) == c) {
if (c == 0) {
s = NULL;
Expand All @@ -243,7 +243,7 @@ char * win32_strtok_r(char *s, const char *delim, char **lasts) {
return(tok);
}

while (sc != 0);
} while (sc != 0);
}

// NOT REACHED
Expand All @@ -263,7 +263,7 @@ char *win32_strsep (char **stringp, const char *delim) {
c = *s++;
spanp = delim;

do
do {
if ((sc = *spanp++) == c) {
if (c == 0) {
s = NULL;
Expand All @@ -275,7 +275,7 @@ char *win32_strsep (char **stringp, const char *delim) {
return(tok);
}

while (sc != 0);
} while (sc != 0);
}

// NOT REACHED
Expand Down Expand Up @@ -305,9 +305,9 @@ int usleep(unsigned int waitTime) {
QueryPerformanceFrequency(&perf_cnt);
QueryPerformanceCounter(&start);

do
do {
QueryPerformanceCounter((LARGE_INTEGER*)&now);
while ((now.QuadPart - start.QuadPart) / (float)perf_cnt.QuadPart * 1000 * 1000 < waitTime);
} while ((now.QuadPart - start.QuadPart) / (float)perf_cnt.QuadPart * 1000 * 1000 < waitTime);

return(0);
}
Expand Down
4 changes: 2 additions & 2 deletions src/win32/win32_socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#pragma warning(pop)
#endif

/* winsock doesn't feature poll(), so there is a version implemented in terms of select() in mingw.c.
/* winsock doesn't feature poll(), so there is a version implemented in terms of select() in win32_socket.c.
* The following definitions are copied from linux man pages.
* A poll() macro is defined to call the version in mingw.c.
* A poll() macro is defined to call the version in win32_socket.c.
*/
#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0600)

Expand Down

0 comments on commit 06aec5b

Please sign in to comment.