libc: cleanup hangup() function (avoid duplicated literal string)

This commit is contained in:
cinap_lenrek 2024-08-25 19:49:09 +00:00
parent f384231c60
commit 09d69e04b9

View file

@ -8,5 +8,6 @@
int
hangup(int ctl)
{
return write(ctl, "hangup", sizeof("hangup")-1) != sizeof("hangup")-1;
static char msg[] = "hangup";
return write(ctl, msg, sizeof(msg)-1) != sizeof(msg)-1;
}