remove duplication in warning
* dir.c (sys_warning_1): remove duplication in the message. * error.c (rb_mod_sys_fail_str): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
45df1c24d2
commit
338bd4cc65
2
dir.c
2
dir.c
@ -1081,7 +1081,7 @@ dir_s_rmdir(VALUE obj, VALUE dir)
|
|||||||
static VALUE
|
static VALUE
|
||||||
sys_warning_1(VALUE mesg)
|
sys_warning_1(VALUE mesg)
|
||||||
{
|
{
|
||||||
rb_sys_warning("%s:%s", strerror(errno), (const char *)mesg);
|
rb_sys_warning("%s", (const char *)mesg);
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
error.c
1
error.c
@ -2096,7 +2096,6 @@ rb_sys_warning(const char *fmt, ...)
|
|||||||
|
|
||||||
if (!RTEST(ruby_verbose)) return;
|
if (!RTEST(ruby_verbose)) return;
|
||||||
|
|
||||||
snprintf(buf, BUFSIZ, "warning: %s", fmt);
|
|
||||||
snprintf(buf+strlen(buf), BUFSIZ-strlen(buf), ": %s", strerror(errno_save));
|
snprintf(buf+strlen(buf), BUFSIZ-strlen(buf), ": %s", strerror(errno_save));
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user