Skip to contentSkip to conversation

Fix divide by zero message

PATCH New John Levon 1 participant 1 message Nov 12, 2019

lore
Share & tools
lore

John Levon

author
#0 lore raw

PATCH 1/1 Fix divide by zero message

Make *both* divide by zero messages sm_debug().

---
 smatch_sval.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
smatch_sval.c +1 -1
index a39e36ad..6fe29cda 100644
@@ -327,7 +327,7 @@ static sval_t sval_binop_unsigned(struct symbol *type, sval_t left, int op, sval
 		break;
 	case '/':
 		if (right.uvalue == 0) {
-			sm_msg("debug: %s: divide by zero", __func__);
+			sm_debug("%s: divide by zero", __func__);
 			ret.uvalue = 123456789;
 		} else {
 			ret.uvalue = left.uvalue / right.uvalue;
Signature · 1 line
2.17.1