src/t_mtab: Replace sys_siglist[] with strsignal()
authorRostislav Skudnov <rostislav@tuxera.com>
Mon, 22 Jan 2018 15:57:18 +0000 (15:57 +0000)
committerEryu Guan <eguan@redhat.com>
Wed, 24 Jan 2018 04:01:22 +0000 (12:01 +0800)
strsignal(3) says that strsignal() should be used instead of
sys_siglist[].

Signed-off-by: Rostislav Skudnov <rostislav@tuxera.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <eguan@redhat.com>
src/t_mtab.c

index 5e9d521675582646a2c1b458bfcebb9ab291ae49..fd85c6bdf6ca4dcd16e58f50c64e0b97acc8dfee 100644 (file)
@@ -34,7 +34,7 @@ static int signals_have_been_setup = 0;
 /* Ensure that the lock is released if we are interrupted.  */
 static void
 handler (int sig) {
-    fprintf(stderr, "%s\n", sys_siglist[sig]);
+    fprintf(stderr, "%s\n", strsignal(sig));
     exit(1);
 }