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>] [day] [month] [year] [list]
Message-ID: <YpYGsRd0L/6t5wLz@kili>
Date:   Tue, 31 May 2022 15:14:41 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        David Howells <dhowells@...hat.com>
Cc:     Len Baker <len.baker@....com>, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: [PATCH] assoc_array: clean up return in
 assoc_array_insert_mid_shortcut()

The assoc_array_insert_mid_shortcut() function returns type bool.  It's
cleaner to "return true;" instead of returning the edit pointer cast to
bool.

Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
 lib/assoc_array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/assoc_array.c b/lib/assoc_array.c
index 079c72e26493..552a4970a9d1 100644
--- a/lib/assoc_array.c
+++ b/lib/assoc_array.c
@@ -938,7 +938,7 @@ static bool assoc_array_insert_mid_shortcut(struct assoc_array_edit *edit,
 		edit->leaf_p = &new_n0->slots[0];
 
 	pr_devel("<--%s() = ok [split shortcut]\n", __func__);
-	return edit;
+	return true;
 }
 
 /**
-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ