diff options
author | Nobuyoshi Nakada <[email protected]> | 2019-07-15 16:44:07 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2019-07-15 16:49:39 +0900 |
commit | 5e0d27a32f2b3f1242c9990acf83b7970b37bbce (patch) | |
tree | 740522b5030b6ab4a8e0f6d44a5b8eb979801208 | |
parent | de0f192444e3822968d04cdea6e868bd42ccfa7f (diff) |
Removed dead code
If `emesg` is `Qundef`, it is not a message string and then `elen`
(the length of the message) is 0. So `emesg` cannot be `Qundef` in
the `elen != 0` block. Pointed out by Coverity Scan.
-rw-r--r-- | eval_error.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/eval_error.c b/eval_error.c index b0ee0f45c9..44d82e8a7f 100644 --- a/eval_error.c +++ b/eval_error.c @@ -169,9 +169,10 @@ print_errinfo(const VALUE eclass, const VALUE errat, const VALUE emesg, const VA write_warn(str, "\n"); } else { + /* emesg is a String instance */ const char *tail = 0; - if (emesg == Qundef && highlight) write_warn(str, bold); + if (highlight) write_warn(str, bold); if (RSTRING_PTR(epath)[0] == '#') epath = 0; if ((tail = memchr(einfo, '\n', elen)) != 0) { |