lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230916-topic-self_uevent_filtering-v1-1-26ede507d454@gmail.com>
Date:   Sat, 16 Sep 2023 18:11:31 +0200
From:   Javier Carrasco <javier.carrasco.cruz@...il.com>
To:     Shuah Khan <shuah@...nel.org>
Cc:     linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
        Javier Carrasco <javier.carrasco.cruz@...il.com>
Subject: [PATCH] selftests: uevent filtering: fix return on error in
 uevent_listener

Assign the error value to the real returned variable fret. The ret
variable is used to check function return values and assigning values to
it on error has no effect as it is an unused value.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@...il.com>
---
 tools/testing/selftests/uevent/uevent_filtering.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/uevent/uevent_filtering.c b/tools/testing/selftests/uevent/uevent_filtering.c
index 5cebfb356345..e191b6d69f8c 100644
--- a/tools/testing/selftests/uevent/uevent_filtering.c
+++ b/tools/testing/selftests/uevent/uevent_filtering.c
@@ -158,7 +158,7 @@ static int uevent_listener(unsigned long post_flags, bool expect_uevent,
 		r = recvmsg(sk_fd, &hdr, 0);
 		if (r <= 0) {
 			fprintf(stderr, "%s - Failed to receive uevent\n", strerror(errno));
-			ret = -1;
+			fret = -1;
 			break;
 		}
 
@@ -172,7 +172,7 @@ static int uevent_listener(unsigned long post_flags, bool expect_uevent,
 
 		if (!expect_uevent) {
 			fprintf(stderr, "Received unexpected uevent:\n");
-			ret = -1;
+			fret = -1;
 		}
 
 		if (TH_LOG_ENABLED) {

---
base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
change-id: 20230916-topic-self_uevent_filtering-17b53262bc46

Best regards,
-- 
Javier Carrasco <javier.carrasco.cruz@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ