Skip to contentSkip to conversation

kdb: remove unnecessary variable assignment in kdb_bc()

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Jun 22, 2017 – Jun 23, 2017 KGDB / KDB /debug_core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kdb: remove unnecessary variable assignment in kdb_bc()

Value assigned to variable _bp_ at line 415 is the same as at line 434. This makes such variable assignment unnecessary.

Addresses-Coverity-ID: 1227025

---
 kernel/debug/kdb/kdb_bp.c | 1 -
 1 file changed, 1 deletion(-)
kernel/debug/kdb/kdb_bp.c +0 -1
index 90ff129..039a329e 100644
@@ -412,7 +412,6 @@ static int kdb_bc(int argc, const char **argv)
 		 * assume that the breakpoint number is desired.
 		 */
 		if (addr < KDB_MAXBPT) {
-			bp = &kdb_breakpoints[addr];
 			lowbp = highbp = addr;
 			highbp++;
 		} else {
Signature · 1 line
2.5.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Gustavo A. R. Silva

Value assigned to variable _bp_ at line 415 is the same as at line 434. This makes such variable assignment unnecessary.

Addresses-Coverity-ID: 1227025

Quoted 17 lines
---
  kernel/debug/kdb/kdb_bp.c | 1 -
  1 file changed, 1 deletion(-)
kernel/debug/kdb/kdb_bp.c +0 -1
index 90ff129..039a329e 100644
@@ -412,7 +412,6 @@ static int kdb_bc(int argc, const char **argv)
  		 * assume that the breakpoint number is desired.
  		 */
  		if (addr < KDB_MAXBPT) {
-			bp = &kdb_breakpoints[addr];
  			lowbp = highbp = addr;
  			highbp++;
  		} else {