[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-rt-users
Subject:    [PATCH 06/16] rt-tests: pip_stress.c: Remove unnecessary brackets
From:       John Kacur <jkacur () redhat ! com>
Date:       2020-10-29 17:40:47
Message-ID: 20201029174057.20033-7-jkacur () redhat ! com
[Download RAW message or body]

Remove unnecessary brackets as suggested by checkpatch.pl

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 src/pi_tests/pip_stress.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/pi_tests/pip_stress.c b/src/pi_tests/pip_stress.c
index 74cf53dcfa7a..4583aa40a6b8 100644
--- a/src/pi_tests/pip_stress.c
+++ b/src/pi_tests/pip_stress.c
@@ -216,9 +216,8 @@ void high(pid_t pid)
 	Pthread_mutex_lock(resource);
 	Pthread_mutex_lock(statep->mutex);
 		statep->high_owns_resource = 1;
-		if (!statep->low_owns_resource || !statep->medium_started) {
+		if (!statep->low_owns_resource || !statep->medium_started)
 			statep->inversion = 0;
-		}
 	Pthread_mutex_unlock(statep->mutex);
 	Pthread_mutex_unlock(resource);
 	kill(pid, SIGKILL);	/* kill the medium thread */
@@ -228,9 +227,8 @@ void high(pid_t pid)
 
 	if (statep->inversion)
 		printf("Successfully used priority inheritance to handle an inversion\n");
-	else {
+	else
 		printf("No inversion incurred\n");
-	}
 	Pthread_mutex_unlock(statep->mutex);
 }
 
-- 
2.26.2

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic