From 34ad155854cec3504a4775f710b2fa161949cc7b Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sat, 13 Apr 2013 05:25:25 -0700 Subject: [PATCH] Compiler suggested cleanups --- scp.c | 3 ++- sim_defs.h | 2 +- sim_sock.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scp.c b/scp.c index 0f705484..58a0a5fe 100644 --- a/scp.c +++ b/scp.c @@ -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; diff --git a/sim_defs.h b/sim_defs.h index 09cf96f9..e8806dca 100644 --- a/sim_defs.h +++ b/sim_defs.h @@ -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) diff --git a/sim_sock.c b/sim_sock.c index 8f714568..2d826770 100644 --- a/sim_sock.c +++ b/sim_sock.c @@ -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; }