summaryrefslogtreecommitdiff
path: root/threadproc
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2002-07-23 17:01:57 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2002-07-23 17:01:57 +0000
commitf36d94d6c8303f5a1731ea582a73207fa33c6e01 (patch)
treeb937007657992232b4c125b6c796edc3fd4bad2a /threadproc
parent13c8bba017a7d28fd3119768dcffdd316f5022fa (diff)
downloadlibapr-f36d94d6c8303f5a1731ea582a73207fa33c6e01.tar.gz
The old macro was blowing up on some platforms that weren't using gcc.
Specifically, True64 with the cc compiler. This resolves that problem by using a cleaner macro. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63724 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r--threadproc/unix/signals.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/threadproc/unix/signals.c b/threadproc/unix/signals.c
index 61eb9f348..1a3784d73 100644
--- a/threadproc/unix/signals.c
+++ b/threadproc/unix/signals.c
@@ -167,8 +167,14 @@ const char *apr_signal_description_get(int signum)
static const char *signal_description[APR_NUMSIG];
#define store_desc(index, string) \
- (assert(index < APR_NUMSIG), \
- signal_description[index] = string)
+ do { \
+ if (index >= APR_NUMSIG) { \
+ assert(index < APR_NUMSIG); \
+ } \
+ else { \
+ signal_description[index] = string; \
+ } \
+ } while (0)
void apr_signal_init(apr_pool_t *pglobal)
{