diff mbox series

[rt-tests,v4,15/16] cyclictest: Remove unecessary local variable

Message ID 20210210133450.6991-16-dwagner@suse.de
State New
Headers show
Series rt-numa.h cleanups | expand

Commit Message

Daniel Wagner Feb. 10, 2021, 1:34 p.m. UTC
The return value is not used, thus we can avoid the unussed local
variable.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 src/cyclictest/cyclictest.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 8356786a80bb..f912bcf82def 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -1713,18 +1713,13 @@  int main(int argc, char **argv)
 
 	/* Restrict the main pid to the affinity specified by the user */
 	if (affinity_mask) {
-		int res;
-
 		errno = 0;
-		res = numa_sched_setaffinity(getpid(), affinity_mask);
-		if (res != 0)
+		if (numa_sched_setaffinity(getpid(), affinity_mask) != 0)
 			warn("Couldn't setaffinity in main thread: %s\n", strerror(errno));
 	}
 
 	if (trigger) {
-		int retval;
-		retval = trigger_init();
-		if (retval != 0) {
+		if (trigger_init() != 0) {
 			fprintf(stderr, "trigger_init() failed\n");
 			exit(EXIT_FAILURE);
 		}