(strsignal): Count real-time signals from zero.
authordrepper <drepper>
Tue, 11 Aug 1998 18:43:27 +0000 (18:43 +0000)
committerdrepper <drepper>
Tue, 11 Aug 1998 18:43:27 +0000 (18:43 +0000)
string/strsignal.c

index 673706e..90480f5 100644 (file)
@@ -60,12 +60,15 @@ strsignal (int signum)
       signum < 0 || signum >= NSIG || (desc = _sys_siglist[signum]) == NULL)
     {
       char *buffer = getbuffer ();
-      int len = __snprintf (buffer, BUFFERSIZ - 1,
+      int len;
 #ifdef SIGRTMIN
-                           signum >= SIGRTMIN && signum <= SIGRTMAX
-                           ? _("Real-time signal %d") :
+      if (signum >= SIGRTMIN && signum <= SIGRTMAX)
+       len = __snprintf (buffer, BUFFERSIZ - 1, _("Real-time signal %d"),
+                         signum - SIGRTMIN);
+      else
 #endif
-                           _("Unknown signal %d"), signum);
+       len = __snprintf (buffer, BUFFERSIZ - 1, _("Unknown signal %d"),
+                         signum);
       if (len < 0)
        buffer = NULL;
       else