1
0
mirror of https://github.com/open-simh/simh.git synced 2026-02-26 17:03:56 +00:00

Compiler suggested cleanups

This commit is contained in:
Mark Pizzolato
2013-04-13 05:25:25 -07:00
parent 6fd3e5f498
commit 34ad155854
3 changed files with 5 additions and 3 deletions

3
scp.c
View File

@@ -5073,7 +5073,7 @@ char quote_char = 0;
while ((*iptr != 0) &&
((quote && quoting) || ((isspace (*iptr) == 0) && (*iptr != mchar)))) {
if (quote)
if (quote) {
if (quoting) {
if (*iptr == quote_char)
quoting = FALSE;
@@ -5084,6 +5084,7 @@ while ((*iptr != 0) &&
quote_char = *iptr;
}
}
}
if (islower (*iptr) && uc)
*optr = toupper (*iptr);
else *optr = *iptr;

View File

@@ -721,7 +721,7 @@ extern int32 sim_asynch_latency;
extern int32 sim_asynch_inst_latency;
/* Thread local storage */
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__hpux)
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__hpux) && !defined(__OpenBSD__)
#define AIO_TLS __thread
#elif defined(_MSC_VER)
#define AIO_TLS __declspec(thread)

View File

@@ -903,11 +903,12 @@ if (rd)
else select ((int) sock + 1, NULL, rw_p, er_p, &tz);
if (FD_ISSET (sock, er_p))
return -1;
if (FD_ISSET (sock, rw_p))
if (FD_ISSET (sock, rw_p)) {
if (0 == getpeername (sock, (struct sockaddr *)&peername, &peernamesize))
return 1;
else
return -1;
}
return 0;
}