This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v2 3/5] Remove misleading indentation


GCC 6.0+ warns on misleading indentation, so fix it.

winsup/cygserver/ChangeLog
* sysv_msg.cc (msgsnd): Fix misleading indentation.
* sysv_msg.cc (msgrcv): Ditto.
* sysv_sem.cc (semop): Ditto.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
---
 winsup/cygserver/sysv_msg.cc | 6 ++++--
 winsup/cygserver/sysv_sem.cc | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/winsup/cygserver/sysv_msg.cc b/winsup/cygserver/sysv_msg.cc
index 217cc1d..9e90d05 100644
--- a/winsup/cygserver/sysv_msg.cc
+++ b/winsup/cygserver/sysv_msg.cc
@@ -733,7 +733,8 @@ msgsnd(struct thread *td, struct msgsnd_args *uap)
 			if (error != 0) {
 				DPRINTF(("msgsnd:  interrupted system call\n"));
 #ifdef __CYGWIN__
-			  if (error != EIDRM)
+			  if (error == EIDRM)
+                              goto done2;
 #endif /* __CYGWIN__ */
 				error = EINTR;
 				goto done2;
@@ -1089,7 +1090,8 @@ msgrcv(struct thread *td, struct msgrcv_args *uap)
 		if (error != 0) {
 			DPRINTF(("msgrcv:  interrupted system call\n"));
 #ifdef __CYGWIN__
-		    if (error != EIDRM)
+		    if (error == EIDRM)
+                        goto done2;
 #endif /* __CYGWIN__ */
 			error = EINTR;
 			goto done2;
diff --git a/winsup/cygserver/sysv_sem.cc b/winsup/cygserver/sysv_sem.cc
index e7ba48b..349322c 100644
--- a/winsup/cygserver/sysv_sem.cc
+++ b/winsup/cygserver/sysv_sem.cc
@@ -1177,7 +1177,8 @@ semop(struct thread *td, struct semop_args *uap)
 		 */
 		if (error != 0) {
 #ifdef __CYGWIN__
-		    if (error != EIDRM)
+		    if (error == EIDRM)
+                        goto done2;
 #endif /* __CYGWIN__ */
 			error = EINTR;
 			goto done2;
-- 
2.7.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]