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: <96898f808dcd5b2770bfda1c55d7a3bfe68a5e47.1457922411.git.joe@perches.com>
Date:	Sun, 13 Mar 2016 19:27:58 -0700
From:	Joe Perches <joe@...ches.com>
To:	Rasmus Villemoes <linux@...musvillemoes.dk>,
	linux-kernel@...r.kernel.org
Cc:	Jason Wessel <jason.wessel@...driver.com>,
	kgdb-bugreport@...ts.sourceforge.net
Subject: [PATCH] kdb: Replace strncasecmp with strcasecmp

Remove the unnecessary last sizeof("foo") argument to strncasecmp using
strcasecmp without that sizeof as it iss equivalent, simpler and smaller.

Signed-off-by: Joe Perches <joe@...ches.com>
---
 kernel/debug/kdb/kdb_bp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/debug/kdb/kdb_bp.c b/kernel/debug/kdb/kdb_bp.c
index 90ff129..4714b33 100644
--- a/kernel/debug/kdb/kdb_bp.c
+++ b/kernel/debug/kdb/kdb_bp.c
@@ -52,11 +52,11 @@ static int kdb_parsebp(int argc, const char **argv, int *nextargp, kdb_bp_t *bp)
 
 	bp->bph_length = 1;
 	if ((argc + 1) != nextarg) {
-		if (strncasecmp(argv[nextarg], "datar", sizeof("datar")) == 0)
+		if (strcasecmp(argv[nextarg], "datar") == 0)
 			bp->bp_type = BP_ACCESS_WATCHPOINT;
-		else if (strncasecmp(argv[nextarg], "dataw", sizeof("dataw")) == 0)
+		else if (strcasecmp(argv[nextarg], "dataw") == 0)
 			bp->bp_type = BP_WRITE_WATCHPOINT;
-		else if (strncasecmp(argv[nextarg], "inst", sizeof("inst")) == 0)
+		else if (strcasecmp(argv[nextarg], "inst") == 0)
 			bp->bp_type = BP_HARDWARE_BREAKPOINT;
 		else
 			return KDB_ARGCOUNT;
-- 
2.6.3.368.gf34be46

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ