Source-Changes-HG archive

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

[src/trunk]: src/tests/crypto/opencrypto Needs some unconst.



details:   https://anonhg.NetBSD.org/src/rev/2cdd274748c2
branches:  trunk
changeset: 792833:2cdd274748c2
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Jan 18 02:31:14 2014 +0000

description:
Needs some unconst.

diffstat:

 tests/crypto/opencrypto/h_md5hmac.c  |  6 +++---
 tests/crypto/opencrypto/h_sha1hmac.c |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 3ba321618a82 -r 2cdd274748c2 tests/crypto/opencrypto/h_md5hmac.c
--- a/tests/crypto/opencrypto/h_md5hmac.c       Sat Jan 18 01:08:56 2014 +0000
+++ b/tests/crypto/opencrypto/h_md5hmac.c       Sat Jan 18 02:31:14 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: h_md5hmac.c,v 1.3 2014/01/17 22:31:25 pgoyette Exp $ */
+/* $NetBSD: h_md5hmac.c,v 1.4 2014/01/18 02:31:14 joerg Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -154,7 +154,7 @@
                memset(&cs, 0, sizeof(cs));
                cs.mac = CRYPTO_MD5_HMAC;
                cs.mackeylen = tests[i].key_len;
-               cs.mackey = &tests[i].key;
+               cs.mackey = __UNCONST(&tests[i].key);
                res = ioctl(fd, CIOCGSESSION, &cs);
                if (res < 0)
                        err(1, "CIOCGSESSION test %d", tests[i].num);
@@ -164,7 +164,7 @@
                co.ses = cs.ses;
                co.op = COP_ENCRYPT;
                co.len = tests[i].len;
-               co.src = &tests[i].data;
+               co.src = __UNCONST(&tests[i].data);
                co.mac = buf;
                res = ioctl(fd, CIOCCRYPT, &co);
                if (res < 0)
diff -r 3ba321618a82 -r 2cdd274748c2 tests/crypto/opencrypto/h_sha1hmac.c
--- a/tests/crypto/opencrypto/h_sha1hmac.c      Sat Jan 18 01:08:56 2014 +0000
+++ b/tests/crypto/opencrypto/h_sha1hmac.c      Sat Jan 18 02:31:14 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: h_sha1hmac.c,v 1.1 2014/01/17 22:33:02 pgoyette Exp $ */
+/* $NetBSD: h_sha1hmac.c,v 1.2 2014/01/18 02:31:14 joerg Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -164,7 +164,7 @@
                memset(&cs, 0, sizeof(cs));
                cs.mac = CRYPTO_SHA1_HMAC;
                cs.mackeylen = tests[i].key_len;
-               cs.mackey = &tests[i].key;;
+               cs.mackey = __UNCONST(&tests[i].key);
                res = ioctl(fd, CIOCGSESSION, &cs);
                if (res < 0)
                        err(1, "CIOCGSESSION test %d", tests[i].num);
@@ -174,7 +174,7 @@
                co.ses = cs.ses;
                co.op = COP_ENCRYPT;
                co.len = tests[i].len;
-               co.src = &tests[i].data;
+               co.src = __UNCONST(&tests[i].data);
                co.mac = buf;
                res = ioctl(fd, CIOCCRYPT, &co);
                if (res < 0)



Home | Main Index | Thread Index | Old Index