Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/crypto/blowfish Modified to avoid compiler warnings. Th...



details:   https://anonhg.NetBSD.org/src/rev/eb729535ffb3
branches:  trunk
changeset: 536123:eb729535ffb3
user:      elric <elric%NetBSD.org@localhost>
date:      Sun Sep 08 07:52:41 2002 +0000

description:
Modified to avoid compiler warnings.  The specific warning related
to const BF_KEY * vars, and I chose to ``fix'' it in this file
rather than elsewhere in the framework because, although the other
fix was more appropriate, nothing seems to use the code in this
file and hence the risk of disrupting other people was lower.  In
the future, the more appropriate change would be to change blowfish.h
and bf_enc.c to have functions with signatures:

BF_encrypt(BF_LONG *, const BF_KEY *);
BF_decrypt(BF_LONG *, const BF_KEY *);

diffstat:

 sys/crypto/blowfish/bf_cbc.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (48 lines):

diff -r 44db86bd2cab -r eb729535ffb3 sys/crypto/blowfish/bf_cbc.c
--- a/sys/crypto/blowfish/bf_cbc.c      Sun Sep 08 07:41:01 2002 +0000
+++ b/sys/crypto/blowfish/bf_cbc.c      Sun Sep 08 07:52:41 2002 +0000
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bf_cbc.c,v 1.7 2002/09/07 23:35:37 elric Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bf_cbc.c,v 1.8 2002/09/08 07:52:41 elric Exp $");
 
 #include <sys/types.h>
 
@@ -85,7 +85,7 @@
                        tin1^=tout1;
                        tin[0]=tin0;
                        tin[1]=tin1;
-                       BF_encrypt(tin,schedule);
+                       BF_encrypt(tin,(BF_KEY *)schedule);
                        tout0=tin[0];
                        tout1=tin[1];
                        l2n(tout0,out);
@@ -98,7 +98,7 @@
                        tin1^=tout1;
                        tin[0]=tin0;
                        tin[1]=tin1;
-                       BF_encrypt(tin,schedule);
+                       BF_encrypt(tin,(BF_KEY *)schedule);
                        tout0=tin[0];
                        tout1=tin[1];
                        l2n(tout0,out);
@@ -118,7 +118,7 @@
                        n2l(in,tin1);
                        tin[0]=tin0;
                        tin[1]=tin1;
-                       BF_decrypt(tin,schedule);
+                       BF_decrypt(tin,(BF_KEY *)schedule);
                        tout0=tin[0]^xor0;
                        tout1=tin[1]^xor1;
                        l2n(tout0,out);
@@ -132,7 +132,7 @@
                        n2l(in,tin1);
                        tin[0]=tin0;
                        tin[1]=tin1;
-                       BF_decrypt(tin,schedule);
+                       BF_decrypt(tin,(BF_KEY *)schedule);
                        tout0=tin[0]^xor0;
                        tout1=tin[1]^xor1;
                        l2nn(tout0,tout1,out,l+8);



Home | Main Index | Thread Index | Old Index