Skip to contentSkip to conversation

Uprobe: Assign boolean values to a bool variable

PATCH New Jiapeng Chong 1 participant 1 message Mar 3, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Uprobe: Assign boolean values to a bool variable

Fix the following coccicheck warnings:

./arch/mips/kernel/uprobes.c:78:10-11: WARNING: return of 0/1 in function 'is_trap_insn' with return type bool.

---
 arch/mips/kernel/uprobes.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/mips/kernel/uprobes.c +3 -3
index 6dbe4ea..e66c032 100644
@@ -75,7 +75,7 @@ bool is_trap_insn(uprobe_opcode_t *insn)
 		case tlt_op:
 		case tltu_op:
 		case tne_op:
-			return 1;
+			return true;
 		}
 		break;
 
@@ -87,12 +87,12 @@ bool is_trap_insn(uprobe_opcode_t *insn)
 		case tlti_op:
 		case tltiu_op:
 		case tnei_op:
-			return 1;
+			return true;
 		}
 		break;
 	}
 
-	return 0;
+	return false;
 }
 
 #define UPROBE_TRAP_NR	ULONG_MAX
Signature · 1 line
1.8.3.1