lkml.org 
[lkml]   [2015]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 8/8] kdb_bp.c:42: pointless test
Date
Checking if unsigned variable 'bp_type' is less than zero.

Signed-off-by : <AmeenAli023@gmail.com>
---
kernel/debug/kdb/kdb_bp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/debug/kdb/kdb_bp.c b/kernel/debug/kdb/kdb_bp.c
index e1dbf4a..7ad82e7 100644
--- a/kernel/debug/kdb/kdb_bp.c
+++ b/kernel/debug/kdb/kdb_bp.c
@@ -39,7 +39,7 @@ static char *kdb_rwtypes[] = {

static char *kdb_bptype(kdb_bp_t *bp)
{
- if (bp->bp_type < 0 || bp->bp_type > 4)
+ if (bp->bp_type > 4)
return "";

return kdb_rwtypes[bp->bp_type];
--
2.1.0


\
 
 \ /
  Last update: 2015-03-13 15:01    [W:0.028 / U:22.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site