1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

signal.c: static literal string

* signal.c (sigsegv): make message string static to suppress
  unnecessary copy.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-01-27 13:09:26 +00:00
parent 1c3910635f
commit a97bb1a2f7

View file

@ -691,7 +691,7 @@ sigsegv(int sig SIGINFO_ARG)
{
if (segv_received) {
ssize_t RB_UNUSED_VAR(err);
char msg[] = "SEGV received in SEGV handler\n";
static const char msg[] = "SEGV received in SEGV handler\n";
err = write(2, msg, sizeof(msg));
ruby_abort();