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:
parent
1c3910635f
commit
a97bb1a2f7
1 changed files with 1 additions and 1 deletions
2
signal.c
2
signal.c
|
@ -691,7 +691,7 @@ sigsegv(int sig SIGINFO_ARG)
|
||||||
{
|
{
|
||||||
if (segv_received) {
|
if (segv_received) {
|
||||||
ssize_t RB_UNUSED_VAR(err);
|
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));
|
err = write(2, msg, sizeof(msg));
|
||||||
ruby_abort();
|
ruby_abort();
|
||||||
|
|
Loading…
Reference in a new issue