Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754454AbcCNC2F (ORCPT ); Sun, 13 Mar 2016 22:28:05 -0400 Received: from smtprelay0075.hostedemail.com ([216.40.44.75]:58278 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754047AbcCNC2D (ORCPT ); Sun, 13 Mar 2016 22:28:03 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:800:960:968:973:988:989:1260:1345:1437:1534:1541:1711:1730:1747:1777:1792:2198:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3867:3868:3872:3874:4321:4419:5007:6261:9038:10004:10848:11026:11473:11658:11914:12438:12517:12519:12555:13069:13311:13357:14394:14721:21080:30054,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: fear06_45e2548e10f2c X-Filterd-Recvd-Size: 1835 From: Joe Perches To: Rasmus Villemoes , linux-kernel@vger.kernel.org Cc: Jason Wessel , kgdb-bugreport@lists.sourceforge.net Subject: [PATCH] kdb: Replace strncasecmp with strcasecmp Date: Sun, 13 Mar 2016 19:27:58 -0700 Message-Id: <96898f808dcd5b2770bfda1c55d7a3bfe68a5e47.1457922411.git.joe@perches.com> X-Mailer: git-send-email 2.6.3.368.gf34be46 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1137 Lines: 29 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 --- 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