jbig2dec

Ralph Giles <[email protected]> Mon, 05 Aug 2002 15:56:53 -0700
Newsgroups gmane.comp.printing.ghostscript.jbig2dec.cvs
Message-ID <[email protected]>
Update of /cvsroot/jbig2dec/jbig2dec
In directory usw-pr-cvs1:/tmp/cvs-serv27317

Modified Files:
	jbig2dec.c 
Log Message:
Fix incorrect check for error condition; thanks to Russell Lang's MSVC
compile log for this.


Index: jbig2dec.c
===================================================================
RCS file: /cvsroot/jbig2dec/jbig2dec/jbig2dec.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- jbig2dec.c	5 Aug 2002 21:43:26 -0000	1.38
+++ jbig2dec.c	5 Aug 2002 22:56:51 -0000	1.39
@@ -51,7 +51,7 @@
 hash_init(jbig2dec_params_t *params)
 {
     params->hash_ctx = malloc(sizeof(SHA1_CTX));
-    if (params->hash == NULL) {
+    if (params->hash_ctx == NULL) {
         fprintf(stderr, "unable to allocate hash state\n");
         params->hash = 0;
         return;
@@ -72,7 +72,7 @@
 {
     unsigned char md[SHA1_DIGEST_SIZE];
     char digest[2*SHA1_DIGEST_SIZE + 1];
-    int i, len;
+    int i;
     
     SHA1_Final(params->hash_ctx, md);
     for (i = 0; i < SHA1_DIGEST_SIZE; i++) {