mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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.
This commit is contained in:
parent
de0f192444
commit
5e0d27a32f
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue