Fix format nonliteral in psignal(3).

This commit is contained in:
Jonas 'Sortie' Termansen 2015-10-27 13:46:13 +01:00
parent 91087d9199
commit 09084cf12d
1 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
/******************************************************************************* /*******************************************************************************
Copyright(C) Jonas 'Sortie' Termansen 2013. Copyright(C) Jonas 'Sortie' Termansen 2013, 2015.
This file is part of the Sortix C Library. This file is part of the Sortix C Library.
@ -28,9 +28,9 @@
extern "C" void psignal(int signum, const char* message) extern "C" void psignal(int signum, const char* message)
{ {
flockfile(stderr); const char* signumstr = strsignal(signum);
if ( message && message[0] ) if ( message )
fprintf_unlocked(stderr, "%s: ", message); fprintf(stderr, "%s: %s\n", message, signumstr);
fprintf_unlocked(stderr, strsignal(signum)); else
funlockfile(stderr); fprintf(stderr, "%s\n", signumstr);
} }