summaryrefslogtreecommitdiff
path: root/huffman.c
diff options
context:
space:
mode:
Diffstat (limited to 'huffman.c')
-rw-r--r--huffman.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/huffman.c b/huffman.c
index c6c85e7..168f29a 100644
--- a/huffman.c
+++ b/huffman.c
@@ -62,12 +62,12 @@ DoHuffman(void)
{
const char* context = "CPU:Huffman";
HuffStruct* lochuffstruct = &global_huffstruct;
- clock_t total_time = 0;
- int iterations = 0;
char* comparray = NULL;
char* decomparray = NULL;
char* plaintext = NULL;
-
+ clock_t total_time = 0;
+ int iterations = 0;
+ static int is_adjusted = FALSE;
/*
** Allocate memory for the plaintext and the compressed text.
@@ -127,8 +127,8 @@ DoHuffman(void)
/*
** See if we need to perform self adjustment loop.
*/
- if (lochuffstruct->adjust == FALSE) {
- lochuffstruct->adjust = TRUE;
+ if (is_adjusted == FALSE) {
+ is_adjusted = TRUE;
/*
** Do self-adjustment. This involves initializing the
** # of loops and increasing the loop count until we