1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

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

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.
@ -28,9 +28,9 @@
extern "C" void psignal(int signum, const char* message)
{
flockfile(stderr);
if ( message && message[0] )
fprintf_unlocked(stderr, "%s: ", message);
fprintf_unlocked(stderr, strsignal(signum));
funlockfile(stderr);
const char* signumstr = strsignal(signum);
if ( message )
fprintf(stderr, "%s: %s\n", message, signumstr);
else
fprintf(stderr, "%s\n", signumstr);
}