summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2020-08-20 08:47:27 -0400
committerAndrew Cady <d@jerkface.net>2020-08-20 16:29:57 -0400
commit6ce9e569d8afa86d80005775c0a86cce9c4847a7 (patch)
tree1b16b87078e4863bcc53c3e7ca01daecc08bcb28
parent9217b34608eeb74b3273bc844b1eedf527c0d7d1 (diff)
avoid redundant comparison
-rw-r--r--main.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/main.c b/main.c
index d3bd3a8..117747b 100644
--- a/main.c
+++ b/main.c
@@ -985,17 +985,14 @@ int do_server_loop()
985 985
986 /* Poll for data from our client connection */ 986 /* Poll for data from our client connection */
987 select_rv = select(select_nfds, &fds, NULL, NULL, &tv); 987 select_rv = select(select_nfds, &fds, NULL, NULL, &tv);
988 if(select_rv == -1 || select_rv == 0) 988 if(select_rv == -1)
989 { 989 {
990 if(select_rv == -1) 990 log_printf(L_DEBUG, "Reading from local socket failed: code=%d (%s)\n",
991 { 991 errno, strerror(errno));
992 log_printf(L_DEBUG, "Reading from local socket failed: code=%d (%s)\n", 992 }
993 errno, strerror(errno)); 993 else if (select_rv == 0)
994 } 994 {
995 else 995 log_printf(L_DEBUG2, "Nothing to read...");
996 {
997 log_printf(L_DEBUG2, "Nothing to read...");
998 }
999 } 996 }
1000 else 997 else
1001 { 998 {