Skip to contentSkip to conversation

kdb_bp.c:42: pointless test

PATCH New Ameen Ali 1 participant 1 message Mar 13, 2015 KGDB / KDB /debug_core

lore
Share & tools
lore

Ameen Ali

author
#0 lore raw

PATCH 8/8 kdb_bp.c:42: pointless test

Checking if unsigned variable 'bp_type' is less than zero.

Signed-off-by <[email protected]>
---
 kernel/debug/kdb/kdb_bp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/debug/kdb/kdb_bp.c +1 -1
index e1dbf4a..7ad82e7 100644
@@ -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];
Signature · 1 line
2.1.0