summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--decode11.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/decode11.c b/decode11.c
index a23fa30..f4d721c 100644
--- a/decode11.c
+++ b/decode11.c
@@ -135,19 +135,16 @@ struct QueueHeader
struct QueueEntry *Tail;
};
-static struct QueueHeader ReplyQ[StaticMaxFD];
+static struct QueueHeader *ReplyQ;
/* ************************************************************ */
void
InitReplyQ (void)
{
- short i;
- for (i = 0; i < StaticMaxFD; i++)
- {
- ReplyQ[i].Head = NULL;
- ReplyQ[i].Tail = NULL;
- }
+ ReplyQ = calloc(MaxFD, sizeof(struct QueueHeader));
+ if (ReplyQ == NULL)
+ panic("unable to allocate ReplyQ");
}
void
@@ -211,7 +208,7 @@ SequencedReplyExpected (
/* find the server associated with this client */
fd = FDPair(fd);
- if (fd < 0 || fd >= StaticMaxFD) return;
+ if (fd < 0 || fd >= MaxFD) return;
/* attach the new queue entry to the end of the queue for the Server */
if (ReplyQ[fd].Tail != NULL)