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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <797de95a1830b3b1775dad4ae47b9522ded99ebb.1598518912.git.brookxu@tencent.com>
Date:   Thu, 27 Aug 2020 18:14:12 +0800
From:   Chunguang Xu <brookxu.cn@...il.com>
To:     arnd@...db.de
Cc:     rppt@...nel.org, linux-arch@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 07/23] lib/mpi: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT()
may be realized through them, thus reducing code redundancy and
facilitating problem analysis.

Signed-off-by: Chunguang Xu <brookxu@...cent.com>
---
 lib/mpi/mpi-internal.h | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/lib/mpi/mpi-internal.h b/lib/mpi/mpi-internal.h
index 91df5f0..ee35a69 100644
--- a/lib/mpi/mpi-internal.h
+++ b/lib/mpi/mpi-internal.h
@@ -25,13 +25,8 @@
 #include <linux/errno.h>
 
 #define log_debug printk
-#define log_bug printk
 
-#define assert(x) \
-	do { \
-		if (!x) \
-			log_bug("failed assertion\n"); \
-	} while (0);
+#define assert(x) ASSERT_WARN(x)
 
 /* If KARATSUBA_THRESHOLD is not already defined, define it to a
  * value which is good on most machines.  */
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ