[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] Make fec"s silly "magic-header" stuff work on 64-bit pl...



Update of /home/minion/cvsroot/src/minion/src
In directory moria.mit.edu:/tmp/cvs-serv10719/src

Modified Files:
	fec.c 
Log Message:
Make fec's silly 'magic-header' stuff work on 64-bit platforms.

I think.


Index: fec.c
===================================================================
RCS file: /home/minion/cvsroot/src/minion/src/fec.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- fec.c	28 Nov 2003 04:14:05 -0000	1.11
+++ fec.c	12 Dec 2003 23:53:31 -0000	1.12
@@ -573,7 +573,7 @@
 fec_free(struct fec_parms *p)
 {
     if (p==NULL ||
-       p->magic != ( ( (FEC_MAGIC ^ p->k) ^ p->n) ^ (int)(p->enc_matrix)) ) {
+       p->magic != (((FEC_MAGIC ^ p->k) ^ p->n) ^ (unsigned long)(p->enc_matrix))) {
 	fprintf(stderr, "bad parameters to fec_free\n");
 	return ;
     }
@@ -605,7 +605,7 @@
     retval->k = k ;
     retval->n = n ;
     retval->enc_matrix = NEW_GF_MATRIX(n, k);
-    retval->magic = ( ( FEC_MAGIC ^ k) ^ n) ^ (int)(retval->enc_matrix) ;
+    retval->magic = ((FEC_MAGIC ^ k) ^ n) ^ (unsigned long)(retval->enc_matrix);
     tmp_m = NEW_GF_MATRIX(n, k);
     /*
      * fill the matrix with powers of field elements, starting from 0.