]> granicus.if.org Git - strace/commitdiff
signal: remove redundant checks around NSIG
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 27 Dec 2016 23:41:22 +0000 (23:41 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 27 Dec 2016 23:49:06 +0000 (23:49 +0000)
* signal.c (struct old_sigaction, struct new_sigaction,
struct new_sigaction32): Remove safety checks for NSIG >= sizeof(long).

signal.c

index 2a425b13887a9803ff68ab65350650cd40eee1ee..25329d3ee6821d015984c4f509438c9b07f17220 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -278,7 +278,7 @@ struct old_sigaction {
        unsigned int sa_flags;
        unsigned long sa_handler__;
        /* Kernel treats sa_mask as an array of longs. */
-       unsigned long sa_mask[NSIG / sizeof(long) ? NSIG / sizeof(long) : 1];
+       unsigned long sa_mask[NSIG / sizeof(long)];
 #else
        unsigned long sa_handler__;
        unsigned long sa_mask;
@@ -477,7 +477,7 @@ struct new_sigaction
        unsigned long sa_restorer;
 #endif
        /* Kernel treats sa_mask as an array of longs. */
-       unsigned long sa_mask[NSIG / sizeof(long) ? NSIG / sizeof(long) : 1];
+       unsigned long sa_mask[NSIG / sizeof(long)];
 };
 /* Same for i386-on-x86_64 and similar cases */
 struct new_sigaction32
@@ -487,7 +487,7 @@ struct new_sigaction32
 #if HAVE_SA_RESTORER
        uint32_t sa_restorer;
 #endif
-       uint32_t sa_mask[2 * (NSIG / sizeof(long) ? NSIG / sizeof(long) : 1)];
+       uint32_t sa_mask[2 * (NSIG / sizeof(long))];
 };
 
 static void