From: John Levon <john.levon@joyent.com>
To: smatch@vger.kernel.org
Cc: John Levon <john.levon@joyent.com>
Subject: [PATCH] Fix divide by zero message
Date: Tue, 12 Nov 2019 22:57:21 +0000 [thread overview]
Message-ID: <1573599441-21579-1-git-send-email-john.levon@joyent.com> (raw)
Make *both* divide by zero messages sm_debug().
---
smatch_sval.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/smatch_sval.c b/smatch_sval.c
index a39e36ad..6fe29cda 100644
--- a/smatch_sval.c
+++ b/smatch_sval.c
@@ -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;
--
2.17.1
reply other threads:[~2019-11-12 23:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1573599441-21579-1-git-send-email-john.levon@joyent.com \
--to=john.levon@joyent.com \
--cc=smatch@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).